From 3dd64a5b60d4fd06833be26b2ae58c93e0394982 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Wed, 1 Nov 2023 23:50:05 +0100 Subject: [PATCH] feat(gha): use tox environments --- .github/workflows/testing.yml | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fef5e62..78ada2f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -33,33 +33,12 @@ jobs: - name: pip version run: pip --version - name: Install dependencies + run: python -m pip install tox + - name: Run linting if: matrix.python-version == '3.9' - run: python -m pip install -r requirements-lint.txt - - name: Install dependencies - if: matrix.python-version != '3.9' - run: python -m pip install -r requirements.txt - # formatters - - name: Run pyupgrade - if: matrix.python-version == '3.9' - run: pyupgrade --py37-plus *.py - - name: Run isort - if: matrix.python-version == '3.9' - run: isort --check-only *.py - - name: Run black - if: matrix.python-version == '3.9' - run: black --check --skip-string-normalization *.py - # linters - - name: Lint with bandit - if: matrix.python-version == '3.9' - run: bandit --skip B101 *.py # B101 is assert statements - - name: Lint with codespell - if: matrix.python-version == '3.9' - run: codespell *.rst *.py - - name: Lint with flake8 - if: matrix.python-version == '3.9' - run: flake8 *.py --count --max-complexity=18 --max-line-length=88 --show-source --statistics + run: tox -e lint # tests and coverage - name: Test - run: pytest run_tests.py --cov --cov-report term-missing + run: tox -e test - name: Coverage run: coveralls --service=github