Skip to content

Commit

Permalink
Fix coverage workflow (#4146)
Browse files Browse the repository at this point in the history
* Remove quotes from the if-statement

* Adjust logic

* Fix job naming

* Change order
  • Loading branch information
kratman authored Jun 6, 2024
1 parent f3f7b4c commit b4f8380
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,23 @@ jobs:
if: matrix.os != 'windows-latest'
run: python -m nox -s pybamm-requires

- name: Run unit/coverage tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
shell: bash
run: |
if [ ${{ matrix.python-version }} == "3.12" && ${{ matrix.os }} == "ubuntu-latest" ]; then
python -m nox -s coverage
else
python -m nox -s unit
fi
- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os != 'ubuntu-latest' || matrix.python-version != '3.12'
run: python -m nox -s unit

- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
run: python -m nox -s integration
- name: Run coverage tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: python -m nox -s coverage

- name: Upload coverage report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
run: python -m nox -s integration

# Skips IDAKLU module compilation for speedups, which is already tested in other jobs.
run_doctests:
needs: style
Expand Down

0 comments on commit b4f8380

Please sign in to comment.