Skip to content

Commit

Permalink
Upgrade CI build systems to use Python 3.10 (#1151)
Browse files Browse the repository at this point in the history
* Upgrade CI build systems to use Python 3.10

Changes include:
- Switch Azure Pipelines to use Python 3.10 instead of 3.6
- Switch GitHub Actions to use Python 3.10 instead of 3.10b2 for main CI
- Switch GitHub Actions to use Python 3.10 instead of 3.9 for all auxilliary CI

* Fix nox file
  • Loading branch information
tleonhardt committed Oct 20, 2021
1 parent f57b086 commit 3517951
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 36 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -28,26 +28,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python -m nox --non-interactive --session tests-${{ matrix.python-version }} # Run nox for a single version of Python
ci-beta:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10.0-beta.2"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2 # https://github.com/actions/checkout
with:
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python prerequisites
run: pip install -U --user pip setuptools setuptools-scm nox
- name: Run tests and post coverage results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python -m nox --non-interactive --session tests-3.10 # Run nox for a single version of Python
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: ["3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: ["3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: ["3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: ["3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
9 changes: 3 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
# Run the pipeline with multiple Python versions
strategy:
matrix:
Python36:
python.version: '3.6'
NOXSESSION: 'tests-3.6'
Python37:
python.version: '3.7'
NOXSESSION: 'tests-3.7'
Expand All @@ -26,9 +23,9 @@ jobs:
Python39:
python.version: '3.9'
NOXSESSION: 'tests-3.9'
# Python310:
# python.version: '3.10.0b2'
# NOXSESSION: 'tests-3.10'
Python310:
python.version: '3.10'
NOXSESSION: 'tests-3.10'
# Increase the maxParallel value to simultaneously run the job for all versions in the matrix (max 10 for free open-source)
maxParallel: 10

Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nox


@nox.session(python=['3.9'])
@nox.session(python=['3.10'])
def docs(session):
session.install(
'sphinx',
Expand Down Expand Up @@ -41,7 +41,7 @@ def tests(session, plugin):
)


@nox.session(python=['3.8', '3.9'])
@nox.session(python=['3.8', '3.9', '3.10'])
@nox.parametrize('step', ['mypy', 'flake8'])
def validate(session, step):
session.install('invoke', './[validate]')
Expand Down

0 comments on commit 3517951

Please sign in to comment.