From 15b71f2a3ba4ac433421681db8fd914041bdf5f1 Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Mon, 15 May 2023 16:47:25 +0200 Subject: [PATCH] align CI to use tox (#637) * bump tox python versions to match CI * use tox in CI to align them together * use tox in CI to align them together --- .github/workflows/ci.yml | 24 ++++-------------------- tox.ini | 8 +++++--- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6381738..c539abfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/tox.ini b/tox.ini index 3455b601..16eb90c7 100644 --- a/tox.ini +++ b/tox.ini @@ -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