From 05e133856b49401b4d5cfffedecb51d4c111a799 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 10 Mar 2022 13:17:51 -0600 Subject: [PATCH] ci: Add CPython 3.10 to testing (#1808) * Add CPython 3.10 to the testing matrix in CI. * Use CPython 3.10 as the default Python for all CI/CD workflows. --- .github/workflows/ci.yml | 14 +++++++------- .github/workflows/dependencies-head.yml | 10 +++++----- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/notebooks.yml | 4 ++-- .github/workflows/publish-package.yml | 4 ++-- .github/workflows/release_tests.yml | 6 +++--- .github/workflows/tag.yml | 4 ++-- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925c08bd61..5589b484f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index dc7b6a5e6d..fae3c8c725 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -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 @@ -39,7 +39,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.9'] + python-version: ['3.10'] steps: - uses: actions/checkout@v2 @@ -69,7 +69,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.9'] + python-version: ['3.10'] steps: - uses: actions/checkout@v2 @@ -95,7 +95,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.9'] + python-version: ['3.10'] steps: - uses: actions/checkout@v2 @@ -120,7 +120,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.9'] + python-version: ['3.10'] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6c35fe7288..71e03c4140 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 85a02096c3..9d525b3ae3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 81a1cdceaf..42f8c51d33 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -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 }} diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 02caa503ba..86acc224c3 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -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: | diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml index 74d64e7277..32375cc881 100644 --- a/.github/workflows/release_tests.yml +++ b/.github/workflows/release_tests.yml @@ -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 @@ -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 diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 7ba54091d4..12eb64ef0a 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -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