Skip to content

Commit 5214bd6

Browse files
committed
Update GitHub Actions workflows
1 parent 01d13c4 commit 5214bd6

File tree

6 files changed

+53
-26
lines changed

6 files changed

+53
-26
lines changed

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

Lines changed: 5 additions & 3 deletions
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:
@@ -29,7 +30,7 @@ jobs:
2930
R_KEEP_PKG_SOURCE: yes
3031

3132
steps:
32-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3334

3435
- uses: r-lib/actions/setup-pandoc@v2
3536

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

.github/workflows/pkgdown.yaml

Lines changed: 5 additions & 4 deletions
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/test-coverage.yaml

Lines changed: 19 additions & 8 deletions
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,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ knitr::opts_chunk$set(
1717
# ArchaeoCal
1818

1919
<!-- badges: start -->
20-
[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/workflows/R-CMD-check/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions)
21-
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://codecov.io/gh/ArchaeoStat/ArchaeoCal)
20+
[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions/workflows/R-CMD-check.yaml)
21+
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://app.codecov.io/gh/ArchaeoStat/ArchaeoCal)
2222

2323
[![r-universe](https://archaeostat.r-universe.dev/badges/ArchaeoCal)](https://archaeostat.r-universe.dev){.pkgdown-devel}
24-
2524
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
2625
<!-- badges: end -->
2726

@@ -32,7 +31,10 @@ knitr::opts_chunk$set(
3231
You can install the latest version of **ArchaeoCal** from [our repository](https://ArchaeoStat.r-universe.dev) with:
3332

3433
```{r universe-installation, eval=FALSE}
35-
install.packages("ArchaeoCal", repos = "https://archaeostat.r-universe.dev")
34+
options(repos = c(CRAN = "https://cloud.r-project.org",
35+
tesselle = "https://archaeostat.r-universe.dev"))
36+
37+
install.packages("ArchaeoCal")
3638
```
3739

3840
And the development version from [GitHub](https://github.com/) with:

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55

66
<!-- badges: start -->
77

8-
[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/workflows/R-CMD-check/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions)
9-
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://codecov.io/gh/ArchaeoStat/ArchaeoCal)
8+
[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions/workflows/R-CMD-check.yaml)
9+
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://app.codecov.io/gh/ArchaeoStat/ArchaeoCal)
1010

1111
<a href="https://archaeostat.r-universe.dev" class="pkgdown-devel"><img
1212
src="https://archaeostat.r-universe.dev/badges/ArchaeoCal"
13-
alt="r-universe" /></a>
14-
15-
[![Project Status: WIP – Initial development is in progress, but there
16-
has not yet been a stable, usable release suitable for the
13+
alt="r-universe" /></a> [![Project Status: WIP – Initial development is
14+
in progress, but there has not yet been a stable, usable release
15+
suitable for the
1716
public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
1817
<!-- badges: end -->
1918

@@ -25,7 +24,10 @@ You can install the latest version of **ArchaeoCal** from [our
2524
repository](https://ArchaeoStat.r-universe.dev) with:
2625

2726
``` r
28-
install.packages("ArchaeoCal", repos = "https://archaeostat.r-universe.dev")
27+
options(repos = c(CRAN = "https://cloud.r-project.org",
28+
tesselle = "https://archaeostat.r-universe.dev"))
29+
30+
install.packages("ArchaeoCal")
2931
```
3032

3133
And the development version from [GitHub](https://github.com/) with:

_pkgdown.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
url: https://archaeostat.github.io/archaeocal/
2+
development:
3+
mode: auto
4+
5+
template:
6+
bootstrap: 5
7+
light-switch: true
8+
9+
search:
10+
exclude: ['CODE_OF_CONDUCT.html','CONTRIBUTING.html','LICENSE.html','authors.html','news/index.html']

0 commit comments

Comments
 (0)