Skip to content

Commit

Permalink
Update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Dec 17, 2024
1 parent 01d13c4 commit 07c6511
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 26 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -29,7 +30,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -47,3 +48,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
9 changes: 5 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -22,7 +23,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -41,7 +42,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +16,46 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
10 changes: 6 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ knitr::opts_chunk$set(
# ArchaeoCal

<!-- badges: start -->
[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/workflows/R-CMD-check/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions)
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://codecov.io/gh/ArchaeoStat/ArchaeoCal)
[![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)
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://app.codecov.io/gh/ArchaeoStat/ArchaeoCal)

[![r-universe](https://archaeostat.r-universe.dev/badges/ArchaeoCal)](https://archaeostat.r-universe.dev){.pkgdown-devel}

[![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)
<!-- badges: end -->

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

```{r universe-installation, eval=FALSE}
install.packages("ArchaeoCal", repos = "https://archaeostat.r-universe.dev")
options(repos = c(CRAN = "https://cloud.r-project.org",
tesselle = "https://archaeostat.r-universe.dev"))
install.packages("ArchaeoCal")
```

And the development version from [GitHub](https://github.com/) with:
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

<!-- badges: start -->

[![R-CMD-check](https://github.com/ArchaeoStat/ArchaeoCal/workflows/R-CMD-check/badge.svg)](https://github.com/ArchaeoStat/ArchaeoCal/actions)
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://codecov.io/gh/ArchaeoStat/ArchaeoCal)
[![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)
[![codecov](https://codecov.io/gh/ArchaeoStat/ArchaeoCal/branch/main/graph/badge.svg?token=fXOWoBzKIw)](https://app.codecov.io/gh/ArchaeoStat/ArchaeoCal)

<a href="https://archaeostat.r-universe.dev" class="pkgdown-devel"><img
src="https://archaeostat.r-universe.dev/badges/ArchaeoCal"
alt="r-universe" /></a>

[![Project Status: WIP – Initial development is in progress, but there
has not yet been a stable, usable release suitable for the
alt="r-universe" /></a> [![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)
<!-- badges: end -->

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

``` r
install.packages("ArchaeoCal", repos = "https://archaeostat.r-universe.dev")
options(repos = c(CRAN = "https://cloud.r-project.org",
tesselle = "https://archaeostat.r-universe.dev"))

install.packages("ArchaeoCal")
```

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

0 comments on commit 07c6511

Please sign in to comment.