diff --git a/.github/workflows/GitHub_Actions_CI.yaml b/.github/workflows/R-CMD-check.yaml similarity index 64% rename from .github/workflows/GitHub_Actions_CI.yaml rename to .github/workflows/R-CMD-check.yaml index 2bd6727..b8de4fe 100644 --- a/.github/workflows/GitHub_Actions_CI.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,36 +1,46 @@ -# CI GitHub Action ... adapted from usethis::use_github_actions() +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [master] - + branches: [main, master] pull_request: - branches: [master, new_feature] + branches: [main, master] -name: GitHub Actions CI +name: R-CMD-check.yaml -## change if caches needs to be refreshed -env: - cache-version: v4 +permissions: read-all jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + strategy: fail-fast: false matrix: config: - - {os: windows-latest, r: 'release', not_cran: 'true'} - - {os: macos-12, r: 'release', not_cran: 'true'} - - {os: ubuntu-latest, r: 'devel', not_cran: 'true'} - - {os: ubuntu-latest, r: 'release', not_cran: 'true'} - - {os: ubuntu-latest, r: 'oldrel', not_cran: 'true'} + - {os: macos-12, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} env: - _R_CHECK_FORCE_SUGGESTS_: true GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + - name: Install JAGS on macOS if: runner.os == 'macOS' run: brew install jags @@ -48,30 +58,12 @@ jobs: 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' C:\JAGS-4.3.1.exe /S - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: | - any::rcmdcheck - any::XML - any::covr + extra-packages: any::rcmdcheck needs: check - - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true - - - name: Test coverage - run: | - covr::codecov() - shell: Rscript {0} + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 0000000..9882260 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,61 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: test-coverage.yaml + +permissions: read-all + +jobs: + test-coverage: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - 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, any::xml2 + needs: coverage + + - name: Test coverage + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + 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_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + 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 + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/README.Rmd b/README.Rmd index 2e001e4..b2f77dc 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ library(BayLum) # BayLum -[![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) +[![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) [![codecov](https://codecov.io/gh/crp2a/BayLum/graph/badge.svg?token=cOdZr6imKX)](https://app.codecov.io/gh/crp2a/BayLum) [![r-universe](https://crp2a.r-universe.dev/badges/BayLum)](https://crp2a.r-universe.dev/BayLum) @@ -41,32 +41,29 @@ print(cite, bibtex = FALSE) ## Installation -To install the latest development builds directly from GitHub, run +**You need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on your computer.** -```{r gh-installation, eval = FALSE} -if(!require("devtools")) - install.packages("devtools") -devtools::install_github("crp2a/BayLum@master") -``` - -To install a developer build other than 'master', replace the term 'master' in the codeline by the name -of the wanted developer build. - -**Please note that you need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on your computer** - -## Note +You can install the released version of **BayLum** from [CRAN](https://CRAN.R-project.org) with: -**The package comes without any guarantee!** +```{r cran-installation, eval=FALSE} +install.packages("BayLum") +``` -Please further note that this version is a development version and may change day by day. For stable branches please visit -the package on [CRAN 'BayLum'](https://CRAN.R-project.org/package=BayLum ). +And the development version from [GitHub](https://github.com/) with: -## Funding +```{r gh-installation, eval=FALSE} +# install.packages("remotes") +remotes::install_github("crp2a/BayLum") +``` -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. +Please note that development versions may change day by day. ## License 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. 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. + +## Acknowledgements + +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. diff --git a/README.md b/README.md index 0007936..08dae30 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ -[![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) +[![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) [![codecov](https://codecov.io/gh/crp2a/BayLum/graph/badge.svg?token=cOdZr6imKX)](https://app.codecov.io/gh/crp2a/BayLum) [![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 ## Installation -To install the latest development builds directly from GitHub, run +**You need to have [JAGS](https://mcmc-jags.sourceforge.io) installed on +your computer.** + +You can install the released version of **BayLum** from +[CRAN](https://CRAN.R-project.org) with: ``` r -if(!require("devtools")) - install.packages("devtools") -devtools::install_github("crp2a/BayLum@master") +install.packages("BayLum") ``` -To install a developer build other than ‘master’, replace the term -‘master’ in the codeline by the name of the wanted developer build. - -**Please note that you need to have -[JAGS](https://mcmc-jags.sourceforge.io) installed on your computer** - -## Note +And the development version from [GitHub](https://github.com/) with: -**The package comes without any guarantee!** - -Please further note that this version is a development version and may -change day by day. For stable branches please visit the package on [CRAN -‘BayLum’](https://CRAN.R-project.org/package=BayLum). +``` r +# install.packages("remotes") +remotes::install_github("crp2a/BayLum") +``` -## Funding - -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. +Please note that development versions may change day by day. ## License @@ -92,3 +81,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](https://github.com/crp2a/BayLum/blob/master/LICENSE) for more details. + +## Acknowledgements + +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.