Skip to content

Commit

Permalink
ci(backport): Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed May 30, 2024
1 parent 1b61882 commit 55cbd42
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ jobs:
echo "steps.script.outputs.old_tag=v${current_tag}"
echo "old_tag=v${current_tag}" >> $GITHUB_OUTPUT
- name: Set up Python 3.11
- name: Set up Python 3.12
if: success()
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Python dependencies
run: |
Expand Down
38 changes: 27 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: macos-latest
python-version: '3.11'
python-version: '3.12'
# Intel runner
- os: macos-13
python-version: '3.12'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -68,34 +71,47 @@ jobs:
if: >-
github.event_name != 'schedule' &&
matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}

- name: Test Contrib module with pytest
run: |
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.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: contrib
token: ${{ secrets.CODECOV_TOKEN }}

- name: Test docstring examples with doctest
if: matrix.python-version == '3.11'
run: pytest src/ README.rst
# TODO: Don't currently try to match amd64 and arm64 floating point for docs, but will in the future.
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
run: coverage run --data-file=.coverage-doctest --module pytest src/ README.rst

- name: Coverage report for doctest only
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
run: |
coverage report --data-file=.coverage-doctest
coverage xml --data-file=.coverage-doctest -o doctest-coverage.xml
- name: Report doctest coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: true
files: doctest-coverage.xml
flags: doctest
token: ${{ secrets.CODECOV_TOKEN }}

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

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

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

steps:
- uses: actions/checkout@v4
Expand All @@ -93,13 +93,13 @@ jobs:
run: |
pytest --ignore tests/benchmarks/ --ignore tests/contrib --ignore tests/test_notebooks.py
uproot4:
uproot5:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
python-version: ['3.12']

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

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

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

steps:
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notebooks.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.10']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install python-build and twine
run: |
Expand Down Expand Up @@ -130,13 +130,13 @@ jobs:
if: >-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'scikit-hep/pyhf')
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' && github.repository == 'scikit-hep/pyhf')
uses: pypa/[email protected].11
uses: pypa/[email protected].14
with:
repository-url: https://test.pypi.org/legacy/
print-hash: true

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'scikit-hep/pyhf'
uses: pypa/[email protected].11
uses: pypa/[email protected].14
with:
print-hash: true
8 changes: 6 additions & 2 deletions .github/workflows/release_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: macos-latest
python-version: '3.10'
python-version: '3.12'
# Intel runner
- os: macos-13
python-version: '3.12'
fail-fast: false

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 55cbd42

Please sign in to comment.