Skip to content

Commit

Permalink
updates ci for correct python versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Apr 1, 2024
1 parent 2131c3e commit 9164904
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ jobs:
with: {python-version: "3.11"}
- name: Run static analysis and format checkers
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Install tox-gh plugin
run: python -m pip install tox-gh>=1.2
- name: Build package distribution files
run: pipx run --spec 'tox~=3.0' tox -e clean,build
run: tox -e clean,build
- name: Record the paths of wheel and source tarball distributions
id: distribution-paths
run: |
Expand All @@ -58,7 +60,7 @@ jobs:
strategy:
matrix:
python:
- "3.9"
- "3.8" # oldest Python that is supported
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
Expand All @@ -74,6 +76,10 @@ jobs:
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
- name: Install tox-gh plugin
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run tests (without integration tests)
if: matrix.platform != 'ubuntu-latest' || matrix.python != '3.11'
env:
Expand All @@ -87,8 +93,7 @@ jobs:
env:
SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }}
run: >-
pipx run --spec 'tox~=3.0' tox
--installpkg '${{ needs.prepare.outputs.wheel-path }}'
tox --installpkg '${{ needs.prepare.outputs.wheel-path }}'
-- -rFEx --durations 10 --color yes
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ package_dir =
=src

# Require a min/specific Python version (comma-separated conditions)
python_requires = >=3.9
python_requires = >=3.8, <3.12

# Add here dependencies of your project (line-separated), e.g. requests>=2.2,<3.0.
# Version specifiers like >=2.2,<3.0 avoid problems due to API changes in
Expand Down
9 changes: 7 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

[tox]
minversion = 3.24
envlist = default
minversion = 4.2
isolated_build = True

[gh]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
description = Invoke pytest to run automated tests
Expand Down

0 comments on commit 9164904

Please sign in to comment.