-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.26 KB
/
test-coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures?
# Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: Generate Coverage Report
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NOT_CRAN: true
steps:
- name: Checkout ACRO
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
needs: coverage
cache-version: 2
- name: Generate xml Report
run: |
covr::to_cobertura(
covr::package_coverage(),
filename = "coverage.xml"
)
shell: Rscript {0}
- name: Upload Report to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true