Skip to content

Commit 113d431

Browse files
committed
Update GitHub Actions
1 parent 14667ae commit 113d431

File tree

4 files changed

+56
-21
lines changed

4 files changed

+56
-21
lines changed

.github/workflows/R-CMD-check.yaml

+9-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

9-
name: R-CMD-check
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
R-CMD-check:
@@ -18,19 +19,18 @@ jobs:
1819
fail-fast: false
1920
matrix:
2021
config:
21-
- {os: macOS-latest, r: 'release'}
22+
- {os: macos-latest, r: 'release'}
2223
- {os: windows-latest, r: 'release'}
23-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24-
- {os: ubuntu-latest, r: 'release'}
25-
- {os: ubuntu-latest, r: '3.6'}
26-
- {os: ubuntu-latest, r: '3.4'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: '3.6'}
2727

2828
env:
2929
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3030
R_KEEP_PKG_SOURCE: yes
3131

3232
steps:
33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v4
3434

3535
- uses: r-lib/actions/setup-pandoc@v2
3636

@@ -48,3 +48,4 @@ jobs:
4848
- uses: r-lib/actions/check-r-package@v2
4949
with:
5050
upload-snapshots: true
51+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87
release:
98
types: [published]
109
workflow_dispatch:
1110

12-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
1314

1415
jobs:
1516
pkgdown:
@@ -19,8 +20,10 @@ jobs:
1920
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2021
env:
2122
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
2225
steps:
23-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2427

2528
- uses: r-lib/actions/setup-pandoc@v2
2629

@@ -39,7 +42,7 @@ jobs:
3942

4043
- name: Deploy to GitHub pages 🚀
4144
if: github.event_name != 'pull_request'
42-
uses: JamesIves/github-pages-deploy-action@4.1.4
45+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4346
with:
4447
clean: false
4548
branch: gh-pages

.github/workflows/test-coverage.yaml

+39-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

9-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
test-coverage:
@@ -15,16 +16,46 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
1920

20-
- uses: r-lib/actions/setup-r@v1
21+
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

24-
- uses: r-lib/actions/setup-r-dependencies@v1
25+
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: covr
27+
extra-packages: any::covr, any::xml2
28+
needs: coverage
2729

2830
- name: Test coverage
29-
run: covr::codecov()
31+
run: |
32+
cov <- covr::package_coverage(
33+
quiet = FALSE,
34+
clean = FALSE,
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
36+
)
37+
covr::to_cobertura(cov)
3038
shell: Rscript {0}
39+
40+
- uses: codecov/codecov-action@v4
41+
with:
42+
# Fail if error if not on PR, or if on PR and token is given
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
49+
- name: Show testthat output
50+
if: always()
51+
run: |
52+
## --------------------------------------------------------------------
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
shell: bash
55+
56+
- name: Upload test results
57+
if: failure()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: coverage-test-failures
61+
path: ${{ runner.temp }}/package

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CRAN](https://www.r-pkg.org/badges/version/msigdbr)](https://cran.r-project.org/package=msigdbr)
44
[![CRAN downloads](https://cranlogs.r-pkg.org/badges/last-month/msigdbr)](https://cran.r-project.org/package=msigdbr)
55
[![R-CMD-check](https://github.com/igordot/msigdbr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/igordot/msigdbr/actions/workflows/R-CMD-check.yaml)
6-
[![codecov](https://codecov.io/gh/igordot/msigdbr/branch/master/graph/badge.svg?token=nYFPe9mc0Q)](https://app.codecov.io/gh/igordot/msigdbr)
6+
[![Codecov test coverage](https://codecov.io/gh/igordot/msigdbr/graph/badge.svg)](https://app.codecov.io/gh/igordot/msigdbr)
77

88
## Overview
99

0 commit comments

Comments
 (0)