Skip to content

Commit f1bde2f

Browse files
committed
update github actions with tox
1 parent 1d110ad commit f1bde2f

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
name: Python Package
2-
on: [push, pull_request]
1+
name: Python Test
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
37

48
jobs:
59
build-linux:
@@ -9,23 +13,23 @@ jobs:
913
python-version: ['3.7', '3.8', '3.9', '3.10']
1014

1115
steps:
12-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1317
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v3
18+
uses: actions/setup-python@v5
1519
with:
1620
python-version: ${{ matrix.python-version }}
1721
- name: Install dependencies
1822
run: |
1923
python -m pip install --upgrade pip
2024
pip install -e .[dev]
21-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
22-
- name: Test with pytest
25+
- name: Test with tox
2326
run: |
24-
cd tests
25-
pytest .
27+
tox run
28+
env:
29+
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
2630
- name: Test parallel execution
2731
run: |
2832
cd integration-tests/parallelization
2933
bash time-parallel-tests.sh .
3034
- name: Publish Unit Test Results
31-
uses: EnricoMi/publish-unit-test-result-action@v2.0.0-beta.2
35+
uses: EnricoMi/publish-unit-test-result-action@v2

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ deps =
1010
pytest8: pytest~=8.0
1111
commands =
1212
pytest
13+
14+
[gh]
15+
python =
16+
3.7 = py37-pytest7, py37-pytest8
17+
3.8 = py38-pytest7, py38-pytest8
18+
3.9 = py39-pytest7, py39-pytest8
19+
3.10 = py310-pytest7, py310-pytest8

0 commit comments

Comments
 (0)