Skip to content

Commit 345fa47

Browse files
Merge #144
144: Add coverage GHA r=charleskawczynski a=charleskawczynski This PR adds coverage GHA, and updates the readme. Co-authored-by: Charles Kawczynski <[email protected]>
2 parents 2deed06 + 9319660 commit 345fa47

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

.github/codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
comment: false
2+
coverage:
3+
status:
4+
project:
5+
default:
6+
target: auto
7+
# this allows a 10% drop from the previous base commit coverage
8+
threshold: 10%
9+
10+
github_checks:
11+
annotations: false

.github/workflows/CodeCov.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeCov
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- trying
8+
- staging
9+
tags: '*'
10+
pull_request:
11+
12+
jobs:
13+
codecov:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/[email protected]
18+
19+
- name: Set up Julia
20+
uses: julia-actions/setup-julia@latest
21+
with:
22+
version: 1.8
23+
24+
- name: Test with coverage
25+
env:
26+
JULIA_PROJECT: "@."
27+
run: |
28+
julia --project=@. -e 'using Pkg; Pkg.instantiate()'
29+
julia --project=@. -e 'using Pkg; Pkg.test(coverage=true)'
30+
31+
- name: Generate coverage file
32+
env:
33+
JULIA_PROJECT: "@."
34+
run: julia --project=@. -e 'using Pkg; Pkg.add("Coverage");
35+
using Coverage;
36+
LCOV.writefile("coverage-lcov.info", Codecov.process_folder())'
37+
if: success()
38+
39+
- name: Submit coverage
40+
uses: codecov/[email protected]
41+
with:
42+
token: ${{secrets.CODECOV_TOKEN}}
43+
if: success()

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# ClimaTimeSteppers.jl
22

3-
[![Docs latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://clima.github.io/ClimaTimeSteppers.jl/dev/)
3+
|||
4+
|---------------------:|:----------------------------------------------|
5+
| **Docs Build** | [![docs build][docs-bld-img]][docs-bld-url] |
6+
| **Documentation** | [![dev][docs-dev-img]][docs-dev-url] |
7+
| **GHA CI** | [![gha ci][gha-ci-img]][gha-ci-url] |
8+
| **Code Coverage** | [![codecov][codecov-img]][codecov-url] |
9+
10+
[docs-bld-img]: https://github.com/CliMA/ClimaTimeSteppers.jl/actions/workflows/docs.yml/badge.svg
11+
[docs-bld-url]: https://github.com/CliMA/ClimaTimeSteppers.jl/actions/workflows/docs.yml
12+
13+
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
14+
[docs-dev-url]: https://CliMA.github.io/ClimaTimeSteppers.jl/dev/
15+
16+
[gha-ci-img]: https://github.com/CliMA/ClimaTimeSteppers.jl/actions/workflows/ci.yml/badge.svg
17+
[gha-ci-url]: https://github.com/CliMA/ClimaTimeSteppers.jl/actions/workflows/ci.yml
18+
19+
[codecov-img]: https://codecov.io/gh/CliMA/ClimaTimeSteppers.jl/branch/main/graph/badge.svg
20+
[codecov-url]: https://codecov.io/gh/CliMA/ClimaTimeSteppers.jl
421

522
A CPU- and GPU-friendly package for solving ordinary differential equations

0 commit comments

Comments
 (0)