Skip to content

Commit 8680673

Browse files
authored
Merge pull request #84 from StagPython/tox4-ci
Use tox-gh for CI on github actions
2 parents 8cbfc62 + 76c64b0 commit 8680673

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.github/workflows/tox.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
strategy:
16-
max-parallel: 4
16+
fail-fast: false
1717
matrix:
18-
python-version: ['3.7', '3.8', '3.9', '3.10']
18+
py: ['3.7', '3.8', '3.9', '3.10']
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -24,10 +24,10 @@ jobs:
2424
- name: Setup Python
2525
uses: actions/setup-python@v2
2626
with:
27-
python-version: ${{ matrix.python }}
27+
python-version: ${{ matrix.py }}
2828
- name: Update pip
29-
run: python3 -m pip install -U pip
30-
- name: Install tox
31-
run: python3 -m pip install tox
29+
run: python -m pip install -U pip
30+
- name: Install tox-gh
31+
run: python -m pip install tox-gh
3232
- name: Run tox
33-
run: python3 -m tox
33+
run: tox4 run

tox.ini

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
[tox]
2-
envlist = py37,py38,py39,py310,flake8,mypy
2+
envlist =
3+
py37
4+
py38
5+
py39
6+
py310
7+
flake8
8+
mypy
39
skip_missing_interpreters = True
4-
skipsdist=True
510

611
[testenv]
7-
usedevelop=True
812
deps =
913
pip>=20.2
1014
pytest>=6.0
1115
pytest-cov>=2.10
1216
commands =
1317
stagpy version
14-
pytest --cov=stagpy --cov-report term-missing {posargs}
18+
pytest --cov={envsitepackagesdir}/stagpy --cov-report term-missing {posargs}
1519
setenv = STAGPY_ISOLATED=True
1620

1721
[testenv:flake8]
@@ -46,3 +50,10 @@ per-file-ignores =
4650
setup.py:D
4751
tests/*:D
4852
max_complexity = 15
53+
54+
[gh]
55+
python =
56+
3.7 = py37, mypy
57+
3.8 = py38, mypy
58+
3.9 = py39, mypy
59+
3.10 = py310, flake8, mypy

0 commit comments

Comments
 (0)