Skip to content

Commit

Permalink
add tox-gh-actions tests.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhea committed Dec 11, 2023
1 parent 6f91575 commit 7573541
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Tests

on: pull_request

jobs:
test_all_versions:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
[tox]
min_version = 4.0
env_list = py38, py39, py310, py311, py312,
full_tests, mypy, flake8
mypy, flake8, full_tests
isolated_build = true

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312 mypy flake8 full_tests

[testenv]
setenv = PYTHONPATH = {toxinidir}
deps = .[tests]
Expand All @@ -15,6 +23,7 @@ commands = mypy flipjump

[testenv:full_tests]
python = py312
platform = windows-latest: windows
commands =
pytest --compile -n auto --all
pytest --run -n auto --all
Expand Down

0 comments on commit 7573541

Please sign in to comment.