Skip to content

Commit 808a1fc

Browse files
authored
Merge pull request #77 from gaborcsardi/fix/gha-latest
Use latest GHA workflows
2 parents 721b50a + 30ac403 commit 808a1fc

File tree

4 files changed

+47
-22
lines changed

4 files changed

+47
-22
lines changed

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

+13-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ on:
1010
pull_request:
1111
branches: [main, master]
1212

13-
name: R-CMD-check
13+
name: R-CMD-check.yaml
14+
15+
permissions: read-all
1416

1517
jobs:
1618
R-CMD-check:
@@ -25,21 +27,22 @@ jobs:
2527
- {os: macos-latest, r: 'release'}
2628

2729
- {os: windows-latest, r: 'release'}
28-
# use 4.1 to check with rtools40's older compiler
29-
- {os: windows-latest, r: '4.1'}
30+
# use 4.0 or 4.1 to check with rtools40's older compiler
31+
- {os: windows-latest, r: 'oldrel-4'}
3032

31-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
32-
- {os: ubuntu-latest, r: 'release'}
33-
- {os: ubuntu-latest, r: 'oldrel-1'}
34-
- {os: ubuntu-latest, r: 'oldrel-2'}
35-
- {os: ubuntu-latest, r: 'oldrel-3'}
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'}
3639

3740
env:
3841
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3942
R_KEEP_PKG_SOURCE: yes
4043

4144
steps:
42-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4346

4447
- uses: r-lib/actions/setup-pandoc@v2
4548

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

.github/workflows/pkgdown.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
types: [published]
1010
workflow_dispatch:
1111

12-
name: pkgdown
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
1315

1416
jobs:
1517
pkgdown:
@@ -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

+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
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
test-coverage:
@@ -15,36 +17,45 @@ jobs:
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)