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 12, 2021
1 parent 22b3ae0 commit b3b4e73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 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 @@ -60,20 +60,21 @@ jobs:
- name: Run unit tests
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
needs: [python]
strategy:
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 @@ -188,7 +189,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/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 @@ -53,6 +53,7 @@ jobs:
- name: Run unit tests
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 b3b4e73

Please sign in to comment.