diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e7ee471 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Test tephi + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + key: tox-${{ hashFiles('ci/requirements/dev.yml') }}-${{ hashFiles('tox.ini') }} + path: | + .tox + + - name: Run tox + run: pipx run tox \ No newline at end of file diff --git a/ci/requirements/dev.yml b/ci/requirements/dev.yml new file mode 100644 index 0000000..9d2ba1c --- /dev/null +++ b/ci/requirements/dev.yml @@ -0,0 +1,8 @@ +name: tephi-dev +channels: + - conda-forge +dependencies: + - matplotlib + - numpy + - scipy + - scooby diff --git a/pyproject.toml b/pyproject.toml index 5f9860d..ab4c40f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 79 -target-version = ['py36', 'py37', 'py38'] +target-version = ['py37', 'py38', 'py39', 'py310'] include = '\.pyi?$' exclude = ''' diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..36ede16 --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +[tox] +requires = + tox-conda + tox-run-command +minversion = 3.15 +envlist=py37,py38,py39,py310 + +[testenv] +description = invoke pytest to run automated tests +deps = + pytest + pytest-cov + filelock + requests + imagehash +conda_env = ci/requirements/dev.yml +commands = + pytest --cov tephi --cov-report term-missing {posargs} +