Skip to content

Commit

Permalink
test using python matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
willforde committed Nov 2, 2022
1 parent fd6f66a commit 52acc9d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: tests

on:
push:
branches:
- master
pull_request:
branches:
- master
- push
- pull_request

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Install test dependencies
run: |
python -m pip install --upgrade --no-cache-dir pip
pip install --no-cache-dir tox
- name: Test using tox
run: |
tox
run: tox

- name: Upload test coverage to Codecov
continue-on-error: true
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
envlist = py{37,38,39,310,311},flake8
skip_missing_interpreters = true

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
extras = dev
commands = pytest --cov=htmlement --cov-report xml
Expand Down

0 comments on commit 52acc9d

Please sign in to comment.