Skip to content

Commit 55c31f7

Browse files
committed
Update github actions
1 parent 2b98fcb commit 55c31f7

File tree

4 files changed

+37
-19
lines changed

4 files changed

+37
-19
lines changed

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

+10-9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212

1313
name: R-CMD-check
1414

15+
permissions: read-all
16+
1517
jobs:
1618
R-CMD-check:
1719
runs-on: ${{ matrix.config.os }}
@@ -25,24 +27,22 @@ jobs:
2527
- {os: macos-latest, r: 'release'}
2628

2729
- {os: windows-latest, r: 'release'}
28-
# Use 3.6 to trigger usage of RTools35
29-
- {os: windows-latest, r: '3.6'}
3030
# use 4.1 to check with rtools40's older compiler
3131
- {os: windows-latest, r: '4.1'}
3232

33-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34-
- {os: ubuntu-latest, r: 'release'}
35-
- {os: ubuntu-latest, r: 'oldrel-1'}
36-
- {os: ubuntu-latest, r: 'oldrel-2'}
37-
- {os: ubuntu-latest, r: 'oldrel-3'}
38-
- {os: ubuntu-latest, r: 'oldrel-4'}
33+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
34+
- {os: ubuntu-latest, r: 'release'}
35+
- {os: ubuntu-latest, r: 'oldrel-1'}
36+
- {os: ubuntu-latest, r: 'oldrel-2'}
37+
- {os: ubuntu-latest, r: 'oldrel-3'}
38+
- {os: ubuntu-latest, r: 'oldrel-4'}
3939

4040
env:
4141
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
4242
R_KEEP_PKG_SOURCE: yes
4343

4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646

4747
- uses: r-lib/actions/setup-pandoc@v2
4848

@@ -60,3 +60,4 @@ jobs:
6060
- uses: r-lib/actions/check-r-package@v2
6161
with:
6262
upload-snapshots: true
63+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111

1212
name: pkgdown
1313

14+
permissions: read-all
15+
1416
jobs:
1517
pkgdown:
1618
runs-on: ubuntu-latest
@@ -19,8 +21,10 @@ jobs:
1921
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2022
env:
2123
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
2226
steps:
23-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2428

2529
- uses: r-lib/actions/setup-pandoc@v2
2630

@@ -39,7 +43,7 @@ jobs:
3943

4044
- name: Deploy to GitHub pages 🚀
4145
if: github.event_name != 'pull_request'
42-
uses: JamesIves/github-pages-deploy-action@v4.4.1
46+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4347
with:
4448
clean: false
4549
branch: gh-pages

.github/workflows/pr-commands.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66

77
name: Commands
88

9+
permissions: read-all
10+
911
jobs:
1012
document:
1113
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
@@ -14,7 +16,7 @@ jobs:
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618
steps:
17-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1820

1921
- uses: r-lib/actions/pr-fetch@v2
2022
with:
@@ -51,7 +53,7 @@ jobs:
5153
env:
5254
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
5355
steps:
54-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
5557

5658
- uses: r-lib/actions/pr-fetch@v2
5759
with:

.github/workflows/test-coverage.yaml

+17-6
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,54 @@ on:
88

99
name: test-coverage
1010

11+
permissions: read-all
12+
1113
jobs:
1214
test-coverage:
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618

1719
steps:
18-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
1921

2022
- uses: r-lib/actions/setup-r@v2
2123
with:
2224
use-public-rspm: true
2325

2426
- uses: r-lib/actions/setup-r-dependencies@v2
2527
with:
26-
extra-packages: any::covr
28+
extra-packages: any::covr, any::xml2
2729
needs: coverage
2830

2931
- name: Test coverage
3032
run: |
31-
covr::codecov(
33+
cov <- covr::package_coverage(
3234
quiet = FALSE,
3335
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3537
)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

41+
- uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
3849
- name: Show testthat output
3950
if: always()
4051
run: |
4152
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4354
shell: bash
4455

4556
- name: Upload test results
4657
if: failure()
47-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
4859
with:
4960
name: coverage-test-failures
5061
path: ${{ runner.temp }}/package

0 commit comments

Comments
 (0)