Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to test suite and code coverage #175

Merged
merged 3 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ coverage:
default:
threshold: 100%
base: parent
comment:
# This is set to the number of TCs, plus unit, but can be removed
# (i.e. set to 1) when reporting is separated from coverage.
after_n_builds: 9
31 changes: 22 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ name: Code coverage
on: [push, pull_request]

jobs:
build-test-nans:
build-coverage:

runs-on: ubuntu-latest
defaults:
run:
working-directory: .testing

env:
REPORT_COVERAGE: true

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -23,13 +20,29 @@ jobs:
- uses: ./.github/actions/testing-setup

- name: Compile unit testing
run: make -j build/unit/MOM6
run: make -j build/unit/MOM_unit_tests

- name: Run unit tests
run: make unit.cov.upload
run: make run.cov.unit

- name: Report unit test coverage to CI (PR)
if: github.event_name == 'pull_request'
run: make report.cov.unit REQUIRE_COVERAGE_UPLOAD=true

- name: Report unit test coverage to CI (Push)
if: github.event_name != 'pull_request'
run: make report.cov.unit

- name: Compile MOM6 with code coverage
- name: Compile ocean-only MOM6 with code coverage
run: make -j build/cov/MOM6

- name: Run and post coverage
run: make run.cov -k -s
- name: Run coverage tests
run: make -j -k run.cov

- name: Report coverage to CI (PR)
if: github.event_name == 'pull_request'
run: make report.cov REQUIRE_COVERAGE_UPLOAD=true

- name: Report coverage to CI (Push)
if: github.event_name != 'pull_request'
run: make report.cov
Loading