Skip to content

Commit

Permalink
ci: Add CPython 3.10 to testing (#1808)
Browse files Browse the repository at this point in the history
* Add CPython 3.10 to the testing matrix in CI.
* Use CPython 3.10 as the default Python for all CI/CD workflows.
  • Loading branch information
matthewfeickert authored Mar 10, 2022
1 parent 47ae6ad commit 05e1338
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
include:
- os: macos-latest
python-version: '3.9'
python-version: '3.10'

steps:
- uses: actions/checkout@v2
Expand All @@ -56,7 +56,7 @@ jobs:
uses: mxschmitt/action-tmate@v3

- name: Report core project coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
if: github.event_name != 'schedule' && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
Expand All @@ -67,24 +67,24 @@ jobs:
pytest tests/contrib --mpl --mpl-baseline-path tests/contrib/baseline
- name: Report contrib coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
if: github.event_name != 'schedule' && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: contrib

- name: Test docstring examples with doctest
if: matrix.python-version == '3.9'
if: matrix.python-version == '3.10'
run: pytest src/ README.rst

- name: Report doctest coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
if: github.event_name != 'schedule' && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: doctest

- name: Run benchmarks
if: github.event_name == 'schedule' && matrix.python-version == '3.9'
if: github.event_name == 'schedule' && matrix.python-version == '3.10'
run: |
pytest --benchmark-sort=mean tests/benchmarks/test_benchmark.py
10 changes: 5 additions & 5 deletions .github/workflows/dependencies-head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -39,7 +39,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -95,7 +95,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand All @@ -120,7 +120,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.10'

- name: Install python-build, check-manifest, and twine
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
include:
- os: macos-latest
python-version: '3.9'
python-version: '3.10'

steps:
- uses: actions/checkout@v2
Expand All @@ -35,7 +35,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pyhf[backends,xmlio]
python -m pip install 'pytest~=6.0' pytest-cov
python -m pip install 'pytest~=7.0' pytest-cov
python -m pip list
- name: Canary test public API
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
run: |
git merge --squash "origin/${GITHUB_HEAD_REF}"
git commit -m "${PR_TITLE} (#${PR_NUMBER})"
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.10'
- name: Install bump2version
run: |
python -m pip install --upgrade pip setuptools wheel
Expand Down

0 comments on commit 05e1338

Please sign in to comment.