Skip to content

Commit

Permalink
Check coverage on Python 3.11 for now, run unit tests on 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Nov 16, 2023
1 parent 0db07c7 commit 8d6a16c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# We check coverage on Ubuntu with Python 3.12, so we skip unit tests for it here
# We check coverage on Ubuntu with Python 3.11, so we skip unit tests for it here
# TODO: check coverage with Python 3.12 when [odes] and [jax] support it
exclude:
- os: ubuntu-latest
python-version: "3.12"
python-version: "3.11"
name: Unit tests (${{ matrix.os }} / Python ${{ matrix.python-version }})

steps:
Expand Down Expand Up @@ -116,13 +117,14 @@ jobs:
- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
run: pipx run nox -s unit

# Runs only on Ubuntu with Python 3.12
# Runs only on Ubuntu with Python 3.11
# TODO: check coverage with Python 3.12 when [odes] and [jax] support it
check_coverage:
needs: style
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Coverage tests (ubuntu-latest / Python 3.12)
name: Coverage tests (ubuntu-latest / Python 3.11)

steps:
- name: Check out PyBaMM repository
Expand All @@ -142,11 +144,11 @@ jobs:
sudo dot -c
sudo apt-get install libopenblas-dev texlive-latex-extra dvipng
- name: Set up Python 3.12
- name: Set up Python 3.11
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.12
python-version: 3.11
cache: 'pip'
cache-dependency-path: setup.py

Expand All @@ -171,7 +173,7 @@ jobs:
- name: Install SuiteSparse and SUNDIALS on GNU/Linux
run: pipx run nox -s pybamm-requires

- name: Run unit tests for Ubuntu with Python 3.12 and generate coverage report
- name: Run unit tests for Ubuntu with Python 3.11 and generate coverage report
run: pipx run nox -s coverage

- name: Upload coverage report
Expand Down

0 comments on commit 8d6a16c

Please sign in to comment.