Skip to content

Commit 78b72a6

Browse files
committed
Update GitHub Actions
1 parent 5a598db commit 78b72a6

File tree

4 files changed

+124
-77
lines changed

4 files changed

+124
-77
lines changed
Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
1-
# CI GitHub Action ... adapted from usethis::use_github_actions()
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
23
on:
34
push:
4-
branches: [master]
5-
5+
branches: [main, master]
66
pull_request:
7-
branches: [master, new_feature]
7+
branches: [main, master]
88

9-
name: GitHub Actions CI
9+
name: R-CMD-check.yaml
1010

11-
## change if caches needs to be refreshed
12-
env:
13-
cache-version: v4
11+
permissions: read-all
1412

1513
jobs:
1614
R-CMD-check:
1715
runs-on: ${{ matrix.config.os }}
16+
1817
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
config:
23-
- {os: windows-latest, r: 'release', not_cran: 'true'}
24-
- {os: macos-12, r: 'release', not_cran: 'true'}
25-
- {os: ubuntu-latest, r: 'devel', not_cran: 'true'}
26-
- {os: ubuntu-latest, r: 'release', not_cran: 'true'}
27-
- {os: ubuntu-latest, r: 'oldrel', not_cran: 'true'}
23+
- {os: macos-12, r: 'release'}
24+
- {os: windows-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
26+
- {os: ubuntu-latest, r: 'release'}
27+
- {os: ubuntu-latest, r: 'oldrel-1'}
2828

2929
env:
30-
_R_CHECK_FORCE_SUGGESTS_: true
3130
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
R_KEEP_PKG_SOURCE: yes
3232

3333
steps:
34+
- uses: actions/checkout@v4
35+
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
http-user-agent: ${{ matrix.config.http-user-agent }}
42+
use-public-rspm: true
43+
3444
- name: Install JAGS on macOS
3545
if: runner.os == 'macOS'
3646
run: brew install jags
@@ -48,30 +58,12 @@ jobs:
4858
curl --progress-bar -s -o 'C:\JAGS-4.3.1.exe' -L 'https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/JAGS-4.3.1.exe'
4959
C:\JAGS-4.3.1.exe /S
5060
51-
- uses: actions/checkout@v4
52-
53-
- uses: r-lib/actions/setup-pandoc@v2
54-
55-
- uses: r-lib/actions/setup-r@v2
56-
with:
57-
r-version: ${{ matrix.config.r }}
58-
http-user-agent: ${{ matrix.config.http-user-agent }}
59-
use-public-rspm: true
60-
6161
- uses: r-lib/actions/setup-r-dependencies@v2
6262
with:
63-
extra-packages: |
64-
any::rcmdcheck
65-
any::XML
66-
any::covr
63+
extra-packages: any::rcmdcheck
6764
needs: check
6865

69-
7066
- uses: r-lib/actions/check-r-package@v2
7167
with:
7268
upload-snapshots: true
73-
74-
- name: Test coverage
75-
run: |
76-
covr::codecov()
77-
shell: Rscript {0}
69+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/test-coverage.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: r-lib/actions/setup-r@v2
23+
with:
24+
use-public-rspm: true
25+
26+
- uses: r-lib/actions/setup-r-dependencies@v2
27+
with:
28+
extra-packages: any::covr, any::xml2
29+
needs: coverage
30+
31+
- name: Test coverage
32+
run: |
33+
cov <- covr::package_coverage(
34+
quiet = FALSE,
35+
clean = FALSE,
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
37+
)
38+
covr::to_cobertura(cov)
39+
shell: Rscript {0}
40+
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+
49+
- name: Show testthat output
50+
if: always()
51+
run: |
52+
## --------------------------------------------------------------------
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
shell: bash
55+
56+
- name: Upload test results
57+
if: failure()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: coverage-test-failures
61+
path: ${{ runner.temp }}/package

README.Rmd

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ library(BayLum)
1818
# BayLum <img width=120px src="man/figures/logo_BayLum.png" align="right" />
1919

2020
<!-- badges: start -->
21-
[![R-CMD-check](https://github.com/crp2a/BayLum/actions/workflows/GitHub_Actions_CI.yaml/badge.svg)](https://github.com/crp2a/BayLum/actions/workflows/GitHub_Actions_CI.yaml)
21+
[![R-CMD-check](https://github.com/crp2a/BayLum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/crp2a/BayLum/actions/workflows/R-CMD-check.yaml)
2222
[![codecov](https://codecov.io/gh/crp2a/BayLum/graph/badge.svg?token=cOdZr6imKX)](https://app.codecov.io/gh/crp2a/BayLum)
2323

2424
[![r-universe](https://crp2a.r-universe.dev/badges/BayLum)](https://crp2a.r-universe.dev/BayLum)
@@ -41,32 +41,29 @@ print(cite, bibtex = FALSE)
4141

4242
## Installation
4343

44-
To install the latest development builds directly from GitHub, run
44+
**You need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on your computer.**
4545

46-
```{r gh-installation, eval = FALSE}
47-
if(!require("devtools"))
48-
install.packages("devtools")
49-
devtools::install_github("crp2a/BayLum@master")
50-
```
51-
52-
To install a developer build other than 'master', replace the term 'master' in the codeline by the name
53-
of the wanted developer build.
54-
55-
**Please note that you need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on your computer**
56-
57-
## Note
46+
You can install the released version of **BayLum** from [CRAN](https://CRAN.R-project.org) with:
5847

59-
**The package comes without any guarantee!**
48+
```{r cran-installation, eval=FALSE}
49+
install.packages("BayLum")
50+
```
6051

61-
Please further note that this version is a development version and may change day by day. For stable branches please visit
62-
the package on [CRAN 'BayLum'](https://CRAN.R-project.org/package=BayLum ).
52+
And the development version from [GitHub](https://github.com/) with:
6353

64-
## Funding
54+
```{r gh-installation, eval=FALSE}
55+
# install.packages("remotes")
56+
remotes::install_github("crp2a/BayLum")
57+
```
6558

66-
The development of `'BayLum'` received a state financial support managed by the Agence Nationale de la Recherche (France) through the program *Investissements d'avenir* (ref. [ANR-10-LABX-52](https://lascarbx.labex.u-bordeaux.fr)) between 2015 and 2018.
59+
Please note that development versions may change day by day.
6760

6861
## License
6962

7063
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
7164

7265
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](https://github.com/crp2a/BayLum/blob/master/LICENSE) for more details.
66+
67+
## Acknowledgements
68+
69+
The development of **BayLum** received a state financial support managed by the Agence Nationale de la Recherche (France) through the program *Investissements d'avenir* (ref. [ANR-10-LABX-52](https://lascarbx.labex.u-bordeaux.fr)) between 2015 and 2018.

README.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<!-- badges: start -->
1111

12-
[![R-CMD-check](https://github.com/crp2a/BayLum/actions/workflows/GitHub_Actions_CI.yaml/badge.svg)](https://github.com/crp2a/BayLum/actions/workflows/GitHub_Actions_CI.yaml)
12+
[![R-CMD-check](https://github.com/crp2a/BayLum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/crp2a/BayLum/actions/workflows/R-CMD-check.yaml)
1313
[![codecov](https://codecov.io/gh/crp2a/BayLum/graph/badge.svg?token=cOdZr6imKX)](https://app.codecov.io/gh/crp2a/BayLum)
1414

1515
[![r-universe](https://crp2a.r-universe.dev/badges/BayLum)](https://crp2a.r-universe.dev/BayLum)
@@ -49,35 +49,24 @@ Optically Stimulated (OSL) **Lum**inescence Dating
4949

5050
## Installation
5151

52-
To install the latest development builds directly from GitHub, run
52+
**You need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on
53+
your computer.**
54+
55+
You can install the released version of **BayLum** from
56+
[CRAN](https://CRAN.R-project.org) with:
5357

5458
``` r
55-
if(!require("devtools"))
56-
install.packages("devtools")
57-
devtools::install_github("crp2a/BayLum@master")
59+
install.packages("BayLum")
5860
```
5961

60-
To install a developer build other than ‘master’, replace the term
61-
‘master’ in the codeline by the name of the wanted developer build.
62-
63-
**Please note that you need to have
64-
[JAGS](https://mcmc-jags.sourceforge.io) installed on your computer**
65-
66-
## Note
62+
And the development version from [GitHub](https://github.com/) with:
6763

68-
**The package comes without any guarantee!**
69-
70-
Please further note that this version is a development version and may
71-
change day by day. For stable branches please visit the package on [CRAN
72-
‘BayLum’](https://CRAN.R-project.org/package=BayLum).
64+
``` r
65+
# install.packages("remotes")
66+
remotes::install_github("crp2a/BayLum")
67+
```
7368

74-
## Funding
75-
76-
The development of `'BayLum'` received a state financial support managed
77-
by the Agence Nationale de la Recherche (France) through the program
78-
*Investissements d’avenir* (ref.
79-
[ANR-10-LABX-52](https://lascarbx.labex.u-bordeaux.fr)) between 2015 and
80-
2018.
69+
Please note that development versions may change day by day.
8170

8271
## License
8372

@@ -92,3 +81,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU
9281
General Public
9382
License](https://github.com/crp2a/BayLum/blob/master/LICENSE) for more
9483
details.
84+
85+
## Acknowledgements
86+
87+
The development of **BayLum** received a state financial support managed
88+
by the Agence Nationale de la Recherche (France) through the program
89+
*Investissements d’avenir* (ref.
90+
[ANR-10-LABX-52](https://lascarbx.labex.u-bordeaux.fr)) between 2015 and
91+
2018.

0 commit comments

Comments
 (0)