Skip to content

Commit dc8938f

Browse files
committed
GHA: update workflows
1 parent 9328ae3 commit dc8938f

File tree

6 files changed

+44
-24
lines changed

6 files changed

+44
-24
lines changed

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

+9-7
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ on:
88
push:
99
branches: [main, master]
1010
pull_request:
11-
branches: [main, master]
1211

13-
name: R-CMD-check
12+
name: R-CMD-check.yaml
13+
14+
permissions: read-all
1415

1516
jobs:
1617
R-CMD-check:
@@ -25,11 +26,11 @@ jobs:
2526
- {os: macos-latest, r: 'release'}
2627
- {os: macos-13, r: 'devel'}
2728

28-
- {os: windows-latest, r: 'release'}
2929
# Use 3.6 to trigger usage of RTools35
3030
- {os: windows-latest, r: '3.6'}
31-
# use 4.1 to check with rtools40's older compiler
32-
- {os: windows-latest, r: '4.1'}
31+
# use 4.0 or 4.1 to check with rtools40's older compiler
32+
- {os: windows-latest, r: 'oldrel-4'}
33+
- {os: windows-latest, r: 'release'}
3334

3435
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
3536
- {os: ubuntu-latest, r: 'release'}
@@ -50,7 +51,7 @@ jobs:
5051
sudo locale-gen en_US
5152
echo "LC_ALL=en_US" >> $GITHUB_ENV
5253
53-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
5455

5556
- uses: r-lib/actions/setup-pandoc@v2
5657

@@ -62,9 +63,10 @@ jobs:
6263

6364
- uses: r-lib/actions/setup-r-dependencies@v2
6465
with:
65-
extra-packages: any::rcmdcheck, r-lib/xml2@fix/compile-macos-devel, gaborcsardi/sass@fix/compile-macos-devel
66+
extra-packages: any::rcmdcheck
6667
needs: check
6768

6869
- uses: r-lib/actions/check-r-package@v2
6970
with:
7071
upload-snapshots: true
72+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

+5-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:
@@ -22,7 +23,7 @@ jobs:
2223
permissions:
2324
contents: write
2425
steps:
25-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2627

2728
- uses: r-lib/actions/setup-pandoc@v2
2829

@@ -41,7 +42,7 @@ jobs:
4142

4243
- name: Deploy to GitHub pages 🚀
4344
if: github.event_name != 'pull_request'
44-
uses: JamesIves/github-pages-deploy-action@v4.4.1
45+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4546
with:
4647
clean: false
4748
branch: gh-pages

.github/workflows/pr-commands.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
issue_comment:
55
types: [created]
66

7-
name: Commands
7+
name: pr-commands.yaml
8+
9+
permissions: read-all
810

911
jobs:
1012
document:
@@ -13,8 +15,10 @@ jobs:
1315
runs-on: ubuntu-latest
1416
env:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
permissions:
19+
contents: write
1620
steps:
17-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1822

1923
- uses: r-lib/actions/pr-fetch@v2
2024
with:
@@ -50,8 +54,10 @@ jobs:
5054
runs-on: ubuntu-latest
5155
env:
5256
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
57+
permissions:
58+
contents: write
5359
steps:
54-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
5561

5662
- uses: r-lib/actions/pr-fetch@v2
5763
with:

.github/workflows/test-coverage.yaml

+18-7
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: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

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

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

2021
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

2425
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: any::covr
27+
extra-packages: any::covr, any::xml2
2728
needs: coverage
2829

2930
- name: Test coverage
3031
run: |
31-
covr::codecov(
32+
cov <- covr::package_coverage(
3233
quiet = FALSE,
3334
clean = FALSE,
3435
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3536
)
37+
covr::to_cobertura(cov)
3638
shell: Rscript {0}
3739

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+
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

README.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fs:::pkgdown_tmp(c("/tmp/filedd463d6d7e0f", "/tmp/filedd464dbb3467"))
2222
<!-- badges: start -->
2323
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)
2424
[![R-CMD-check](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml)
25-
[![Codecov test coverage](https://codecov.io/gh/r-lib/fs/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/fs?branch=main)
25+
[![Codecov test coverage](https://codecov.io/gh/r-lib/fs/graph/badge.svg)](https://app.codecov.io/gh/r-lib/fs)
2626
<!-- badges: end -->
2727

2828
**fs** provides a cross-platform, uniform interface to file system operations.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#maturing)
99
[![R-CMD-check](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/fs/actions/workflows/R-CMD-check.yaml)
10-
[![Codecov test
11-
coverage](https://codecov.io/gh/r-lib/fs/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/fs?branch=main)
10+
[![Codecov test
11+
coverage](https://codecov.io/gh/r-lib/fs/graph/badge.svg)](https://app.codecov.io/gh/r-lib/fs)
1212
<!-- badges: end -->
1313

1414
**fs** provides a cross-platform, uniform interface to file system

0 commit comments

Comments
 (0)