Added separate functions for epigeopop #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Unit tests: Windows" | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
test: | |
name: tests on Windows with R ${{ matrix.R }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
R: [ '4.1.0' ] | |
steps: | |
- name: Check Windows architecture | |
run: | | |
if (-not [Environment]::Is64BitOperatingSystem) { throw "Not 64-bit Windows" } | |
Write-Host "OS Architecture: $([Environment]::Is64BitOperatingSystem)" | |
Write-Host "Process Architecture: $([Environment]::Is64BitProcess)" | |
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type" | |
shell: pwsh | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.R }} | |
Ncpus: 2 | |
r-arch: 'x64' | |
- name: Verify R architecture | |
run: | | |
Rscript -e "if(R.version$arch != 'x64') stop('R architecture is not 64-bit!')" | |
Rscript -e "cat('R Architecture:', R.version$arch, '\n')" | |
Rscript -e "cat('.Machine$sizeof.pointer:', .Machine$sizeof.pointer, '\n')" | |
Rscript -e "cat('Using R at:', R.home(), '\n')" | |
shell: cmd | |
- name: Query dependencies | |
run: | | |
install.packages('remotes') | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages | |
uses: actions/[email protected] | |
id: cache | |
with: | |
path: | | |
${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-R${{ matrix.R }}-2-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: ${{ runner.os }}-R${{ matrix.R }}-2- | |
- name: Install packages | |
run: | | |
install.packages(c("devtools")) | |
remotes::install_deps(dependencies = TRUE) | |
remotes::install_cran("rcmdcheck") | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
run: | | |
options(crayon.enabled = TRUE) | |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran" ,'--no-multiarch'), error_on = "error", check_dir = "check") | |
shell: Rscript {0} | |
- name: Show testthat output | |
if: always() | |
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash |