diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 3a3844f..2e2120f 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -5,11 +5,18 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ '3.8' ] steps: - - uses: actions/checkout@main - - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - run: pip install -r requirements.txt - - run: coverage run --source=. -m pytest -v tests && coverage report -m - - run: flake8 + - uses: actions/checkout@main + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@main + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..dc48699 --- /dev/null +++ b/tox.ini @@ -0,0 +1,20 @@ +[tox] +envlist = py38 + +[gh-actions] +python = + 3.8: py38 + +[testenv] +description = "Test environment" +allowlist_externals = + sed +passenv = + HOME +deps = + -rrequirements.txt + pytest-cov +commands = + coverage run --source=. -m pytest -v tests + coverage report -m + flake8