Skip to content

Commit

Permalink
Create a simple CI that tests on multiple python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHodson committed Feb 4, 2024
1 parent ed0cd57 commit 752d0bf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test with tox

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- 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
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ deps =
pytest>=6
commands =
pytest {tty:--color=yes} {posargs}

# Provide a mapping between tox envs and github actions python envs
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311

0 comments on commit 752d0bf

Please sign in to comment.