Skip to content

Commit

Permalink
test: testing multiple versions of Python in GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoTartarini committed Mar 14, 2024
1 parent e8e5cb2 commit 8174511
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-test-publish-testPyPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ jobs:

# I am only testing with py310 but travis is Testing the other versions of Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]

steps:
- uses: actions/checkout@v3
- name: Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
- name: Install Tox and any other packages
run: pip install "tox<4"
- name: Run Tox
run: |
tox -e py310
tox -e ${{ matrix.python-version }}
# deploy:
#
Expand Down
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ envlist =
clean,
check,
docs,
{py39,py310,py311},
{py37,py38,py39,py310,py311},
report
ignore_basepython_conflict = true

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

[testenv]
basepython =
py39: {env:TOXPYTHON:python3.9}
Expand Down

0 comments on commit 8174511

Please sign in to comment.