Skip to content

Commit

Permalink
align CI to use tox (#637)
Browse files Browse the repository at this point in the history
* bump tox python versions to match CI

* use tox in CI to align them together

* use tox in CI to align them together
  • Loading branch information
beliaev-maksim authored May 15, 2023
1 parent 0713065 commit 15b71f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,21 @@ on:

jobs:
linting:
runs-on: ubuntu-latest
strategy:
fail-fast: false
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
make install-pre-commit
make install-deps
python -m pip install tox
- name: Run pre-commit
run: |
pre-commit run -a -v
tox -e precom
- name: Run mypy
run: |
mypy --config-file=./mypy.ini -p responses
- name: Run mypy (namespace packages)
run: |
# see https://github.com/getsentry/responses/issues/556
mypy --config-file=./mypy.ini --namespace-packages -p responses
tox -e mypy
tests:
runs-on: ubuntu-latest
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ commands =

[testenv:mypy]
description = Check types using 'mypy'
basepython = python3.7
basepython = python3.10
commands =
python -m mypy --config-file=mypy.ini -p responses
# see https://github.com/getsentry/responses/issues/556
python -m mypy --config-file=mypy.ini --namespace-packages -p responses

[testenv:precom]
description = Run pre-commit hooks (black, flake, etc)
basepython = python3.7
deps = pre-commit
basepython = python3.10
deps = pre-commit>=2.9.2
commands =
pre-commit run --all-files

0 comments on commit 15b71f2

Please sign in to comment.