1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-21 05:33:20 +02:00

(v2.1.1.9131) implement testthat

This commit is contained in:
2025-01-27 21:43:10 +01:00
parent 92166c16e8
commit f03933940c
63 changed files with 172 additions and 267 deletions

View File

@ -55,31 +55,34 @@ jobs:
# current development version, check all major OSes:
- {os: macOS-latest, r: 'devel', allowfail: false}
- {os: windows-latest, r: 'devel', allowfail: false}
- {os: ubuntu-latest, r: 'devel', allowfail: false}
- {os: ubuntu-latest, r: 'devel', allowfail: false, http-user-agent: 'release'}
# current 'release' version, check all major OSes:
- {os: macOS-latest, r: 'release', allowfail: false}
- {os: windows-latest, r: 'release', allowfail: false}
- {os: ubuntu-latest, r: 'release', allowfail: false}
# older versions (see also check-old.yaml for even older versions):
# older versions (see also check-old-tinytest.yaml for even older versions):
- {os: ubuntu-latest, r: '4.3', allowfail: false}
- {os: ubuntu-latest, r: '4.2', allowfail: false}
- {os: ubuntu-latest, r: '4.1', allowfail: false}
- {os: ubuntu-latest, r: '4.0', allowfail: false} # when a new R releases, this one has to move to check-old.yaml
- {os: ubuntu-latest, r: '4.0', allowfail: false}
- {os: ubuntu-latest, r: '3.6', allowfail: false}
# when testthat loses support for a version, move it to check-old-tinytest.yaml
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- 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 RStudio Package Manager to quickly install packages
use-public-rspm: true
@ -87,17 +90,9 @@ jobs:
with:
extra-packages: any::rcmdcheck
needs: check
upgrade: 'TRUE'
- uses: r-lib/actions/check-r-package@v2
env:
_R_CHECK_LENGTH_1_CONDITION_: verbose
_R_CHECK_LENGTH_1_LOGIC2_: verbose
# during 'R CMD check', R_LIBS_USER will be overwritten, so:
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
R_RUN_TINYTEST: true
- name: Show tinytest output
if: always()
run: |
find . -name 'tinytest.Rout*' -exec cat '{}' \; || true
shell: bash
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

View File

@ -110,6 +110,9 @@ jobs:
# this is a required value to run the unit tests:
R_RUN_TINYTEST: true
run: |
mv tests/testthat inst/
rm tests/testthat.R
mv tests/tinytest.R.old tests/tinytest.R
cd ..
R CMD build AMR
R CMD check --as-cran --no-manual --run-donttest AMR_*.tar.gz

View File

@ -39,7 +39,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3