forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Running tests together on github-actions. (pybamm-team#4108)
* Running tests together Signed-off-by: Pradyot Ranjan <[email protected]> * Running coverage tests together as well Signed-off-by: Pradyot Ranjan <[email protected]> * Added if condition to coverage tests Signed-off-by: Pradyot Ranjan <[email protected]> * Running integration tests as a seperate step Signed-off-by: Pradyot Ranjan <[email protected]> --------- Signed-off-by: Pradyot Ranjan <[email protected]> Co-authored-by: Pradyot Ranjan <[email protected]>
- Loading branch information
Showing
1 changed file
with
10 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,19 +30,15 @@ jobs: | |
python -m pip install pre-commit | ||
pre-commit run -a | ||
run_unit_tests: | ||
run_unit_integration_and_coverage_tests: | ||
needs: style | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-12, macos-14, windows-latest] | ||
python-version: ["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 | ||
exclude: | ||
- os: ubuntu-latest | ||
python-version: "3.12" | ||
name: Unit tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) | ||
name: Tests (${{ matrix.os }} / Python ${{ matrix.python-version }}) | ||
|
||
steps: | ||
- name: Check out PyBaMM repository | ||
|
@@ -107,28 +103,8 @@ jobs: | |
if: matrix.os == 'ubuntu-latest' | ||
run: python -m nox -s pybamm-requires | ||
|
||
- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }} | ||
run: python -m nox -s unit | ||
|
||
check_coverage: | ||
needs: style | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
name: Coverage tests (ubuntu-latest / Python 3.12) | ||
|
||
steps: | ||
- name: Check out PyBaMM repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Linux system dependencies | ||
uses: awalsh128/[email protected] | ||
with: | ||
packages: gfortran gcc graphviz pandoc | ||
execute_install_scripts: true | ||
|
||
# dot -c is for registering graphviz fonts and plugins | ||
- name: Install OpenBLAS and TeXLive for Linux | ||
- name: Run unit/coverage tests for ${{ matrix.os }} with Python ${{ matrix.python-version }} | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo dot -c | ||
|
@@ -243,6 +219,12 @@ jobs: | |
- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }} | ||
run: python -m nox -s integration | ||
|
||
- name: Upload coverage report | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# Skips IDAKLU module compilation for speedups, which is already tested in other jobs. | ||
run_doctests: | ||
needs: style | ||
|