Skip to content

Commit 7908b54

Browse files
committed
Update CI configuration.
1 parent 400c29b commit 7908b54

File tree

1 file changed

+34
-24
lines changed

1 file changed

+34
-24
lines changed

.github/workflows/tox.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1-
name: "tox.yml"
1+
name: tox
22

33
on:
44
push:
55
branches: [ master ]
66
pull_request:
7-
branches: [ master ]
87

98
jobs:
10-
build:
9+
tox-test:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
python:
14+
- {version: '3.8', env: py38}
15+
- {version: '3.9', env: py39}
16+
- {version: '3.10', env: py310}
17+
- {version: '3.11', env: py311}
18+
test_mode: [0, 1]
1119
runs-on: ${{ matrix.os }}
12-
env:
13-
TOXENV: ${{ matrix.test }}
14-
RUN_INTEGRATION_TESTS: ${{ matrix.test_number}}
20+
env:
21+
TOXENV: ${{ matrix.python.env }}
22+
RUN_INTEGRATION_TESTS: ${{ matrix.test_mode }}
1523
steps:
1624
- uses: actions/checkout@v3
17-
- run: pip install "tox"
18-
- run: pip install bandit
25+
- uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python.version }}
28+
- run: pip install tox
1929
- run: pip install codecov
2030
- run: pip install slugs
21-
- run: sudo chmod -R 777 /usr/local/lib/
2231
- run: python3 setup.py install
2332
- run: ./.travis/run.sh
2433
- run: codecov
34+
tox-other:
2535
strategy:
2636
matrix:
27-
test: ["pep8", "bandit", "docs"]
28-
os: [ubuntu-22.04,ubuntu-20.04]
29-
include:
30-
- test: "py38"
31-
test_number: "0"
32-
os: ubuntu-20.04
33-
- test: "py38"
34-
test_number: "1"
35-
os: ubuntu-20.04
36-
- test: "py310"
37-
test_number: "0"
38-
os: ubuntu-22.04
39-
- test: "py310"
40-
test_number: "1"
41-
os: ubuntu-22.04
37+
os: [ubuntu-latest]
38+
python: ['3.8', '3.9', '3.10', '3.11']
39+
test: [pep8, bandit, docs]
40+
runs-on: ${{ matrix.os }}
41+
env:
42+
TOXENV: ${{ matrix.test }}
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: actions/setup-python@v4
46+
with:
47+
python-version: ${{ matrix.python }}
48+
- run: pip install tox
49+
- run: pip install bandit
50+
if: ${{ matrix test == 'bandit' }}
51+
- run: tox

0 commit comments

Comments
 (0)