Skip to content

Commit 133d8a8

Browse files
authored
Fix CI linting workflow (#308)
* ci: No longer fail silently when the expected Python interpreter is missing. The tox "lint" target expects Python 3.10 to be installed, but CI only installs Python 3.9. skip_missing_interpreters caused the "lint" workflow in CI to exit successfully, even though no linting was performed. Signed-off-by: Michael Seifert <[email protected]> * ci: Install Python 3.10 for the "lint" workflow, as expected by the tox configuration. Signed-off-by: Michael Seifert <[email protected]> * ci: Do not inlcude tox's "lint" environment in the set of "3.9" environments of a GitHub actions run. Linting is performed explicitly in a separate workflow and does not need to be run as part of the Python 3.9 tests. Additionally, linting currently expects Python 3.10 and will fail during the Python 3.9 test run. Signed-off-by: Michael Seifert <[email protected]> * build: Dependencies for tox's "lint" environent are installed correctly. The lint environment requires mypy from the test dependencies to be installed. Although the environment defines `extras = testing`, it also specifies `skip_install = true`, which also skips installation of test dependencies. This change removes skip_install = true, so that mypy is installed correctly. Signed-off-by: Michael Seifert <[email protected]> * build: Removed the explicit interpreter version dependency from tox's "version-info" environment. Signed-off-by: Michael Seifert <[email protected]>
1 parent 82d212b commit 133d8a8

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323
- uses: actions/setup-python@v3
2424
with:
25-
python-version: '3.9'
25+
python-version: '3.10'
2626
- name: Install GitHub matcher for ActionLint checker
2727
run: |
2828
echo "::add-matcher::.github/actionlint-matcher.json"

tox.ini

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[tox]
22
minversion = 3.14.0
33
envlist = py37, py38, py39, py310, lint, version-info, pytest-min
4-
skip_missing_interpreters = true
54
isolated_build = true
65
passenv =
76
CI
@@ -23,7 +22,6 @@ allowlist_externals =
2322
make
2423

2524
[testenv:lint]
26-
skip_install = true
2725
basepython = python3.10
2826
extras = testing
2927
deps =
@@ -41,7 +39,6 @@ commands =
4139
coverage report
4240

4341
[testenv:version-info]
44-
basepython = python3.9
4542
deps =
4643
packaging == 21.3
4744
commands =
@@ -51,6 +48,6 @@ commands =
5148
python =
5249
3.7: py37, pytest-min
5350
3.8: py38
54-
3.9: py39, lint
51+
3.9: py39
5552
3.10: py310
5653
pypy3: pypy3

0 commit comments

Comments
 (0)