Skip to content

Commit b6e3c06

Browse files
Re-written using chatGPT4
1 parent c4fc17a commit b6e3c06

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,25 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Set up R
19+
- name: Setup R
2020
uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
2123

22-
- name: Set up Pandoc
23-
uses: r-lib/actions/setup-pandoc@v2
24-
25-
- name: Install system dependencies
24+
- name: Install R package dependencies
2625
uses: r-lib/actions/setup-r-dependencies@v2
2726
with:
28-
extra-packages: |
29-
any::covr
30-
any::rcmdcheck
31-
needs: coverage
27+
extra-packages: covr
3228

33-
- name: Run tests and compute coverage
29+
- name: Run tests and generate coverage
3430
run: |
35-
Rscript -e 'covr::codecov()'
36-
with:
37-
token: ${{ secrets.CODECOV_TOKEN }}
31+
Rscript -e 'cov <- covr::package_coverage()'
32+
Rscript -e 'covr::codecov(coverage = cov)'
3833
39-
- name: Upload test results (Artifacts)
40-
if: always()
34+
# Optional: Upload coverage artifact for GitHub inspection
35+
- name: Save coverage artifacts
4136
uses: actions/upload-artifact@v4
4237
with:
43-
name: testthat-results
44-
path: tests/testthat
38+
name: coverage
39+
path: coverage*.json
40+
if-no-files-found: ignore

0 commit comments

Comments
 (0)