Skip to content

Commit

Permalink
Add Python 3.10 to GitHub Actions workflows
Browse files Browse the repository at this point in the history
Beta releases of Python 3.10 were installed with `"3.10.0-beta - 3.10"`.
Python 3.10 is now stable, so beta versions are no longer needed.

Python versions in YAML must now be quoted. `3.10` is interpreted as a
float and becomes `3.1`, so `"3.10"` must be used instead.
  • Loading branch information
br3ndonland committed Oct 26, 2021
1 parent a4691bf commit 6d78578
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -68,12 +68,13 @@ jobs:
- name: Run unit tests
run: poetry run pytest --cov-report=xml
- name: Upload test coverage report to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
flags: unit
- name: Build Python package with latest Python version and publish to PyPI
if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == 3.9
- name: Build Python package with latest stable Python version and publish to PyPI
if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.10'
run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_TOKEN }}
docker:
runs-on: ubuntu-latest
Expand All @@ -82,7 +83,7 @@ jobs:
fail-fast: false
matrix:
linux-version: ["", "alpine", "slim"]
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -222,7 +223,7 @@ jobs:
-u ${{ github.actor }} --password-stdin
- name: Tag and push Docker images with latest tags
if: >
matrix.python-version == 3.9 &&
matrix.python-version == '3.10' &&
(
startsWith(github.ref, 'refs/tags/') ||
github.ref == 'refs/heads/develop' ||
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -63,6 +63,7 @@ jobs:
- name: Run unit tests
run: poetry run pytest --cov-report=xml
- name: Upload test coverage report to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
Expand Down

0 comments on commit 6d78578

Please sign in to comment.