Skip to content

Commit 52acc9d

Browse files
committed
test using python matrix
1 parent fd6f66a commit 52acc9d

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: tests
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
4+
- push
5+
- pull_request
106

117
jobs:
128
tests:
139
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1413
steps:
1514
- uses: actions/checkout@v3
16-
- uses: actions/setup-python@v4
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
1718
with:
18-
python-version: "3.11"
19+
python-version: ${{ matrix.python-version }}
1920

2021
- name: Install test dependencies
2122
run: |
2223
python -m pip install --upgrade --no-cache-dir pip
2324
pip install --no-cache-dir tox
2425
2526
- name: Test using tox
26-
run: |
27-
tox
27+
run: tox
2828

2929
- name: Upload test coverage to Codecov
3030
continue-on-error: true

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
envlist = py{37,38,39,310,311},flake8
33
skip_missing_interpreters = true
44

5+
[gh-actions]
6+
python =
7+
3.7: py37
8+
3.8: py38
9+
3.9: py39
10+
3.10: py310
11+
3.11: py311
12+
513
[testenv]
614
extras = dev
715
commands = pytest --cov=htmlement --cov-report xml

0 commit comments

Comments
 (0)