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 Nov 2, 2021
1 parent 5214051 commit 6f9f5e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 @@ -67,12 +67,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
if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.10'
run: |
PACKAGE_VERSION=$(poetry version -s)
GIT_TAG_VERSION=$(echo ${{ github.ref }} | cut -d / -f 3)
Expand All @@ -91,7 +92,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 @@ -231,7 +232,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 @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
python-version: "3.10"
- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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 @@ -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"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -62,6 +62,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 6f9f5e0

Please sign in to comment.