fix: laplacian encoding dimension #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: [ published ] | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
# check-out repo and setup python | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
# setup Python 3.8 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# install & configure poetry | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
version: 1.5.0 | |
# load cached venv if cache exists | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
# install dependencies if cache does not exist | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
# install the root project, if required | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: Run black | |
run: | | |
poetry run python -m black -t py38 ./graphtester --check | |
# run linter | |
- name: Lint with flake8 | |
run: | | |
poetry run flake8 ./graphtester --count --statistics | |
# run isort | |
- name: Run isort | |
run: | | |
poetry run isort ./graphtester --check-only --diff | |
# Uncomment when we have tests | |
# # run test suite | |
# - name: Run tests | |
# run: | | |
# poetry run pytest tests/ | |
# publish package to PyPI | |
- name: Publish package | |
if: matrix.python-version == 3.7 && startsWith(github.ref, 'refs/tags') | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $PYPI_TOKEN | |
poetry publish --build |