Skip to content

Commit

Permalink
feat(gha): use tox environments
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Nov 1, 2023
1 parent 67d76cc commit 3dd64a5
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3dd64a5

Please sign in to comment.