test-without-fixtures #462
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
# 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: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
name: test-without-fixtures | |
jobs: | |
test-without-fixtures: | |
runs-on: windows-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
EMODNETWFS_CI: yes | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: fs | |
- name: rm fixtures | |
run: fs::dir_delete(file.path("tests", "fixtures")) | |
shell: Rscript {0} | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: devtools | |
- name: Run devtools::test() | |
run: | | |
run1 <- as.data.frame(devtools::test()) | |
if (sum(run1$error, run1$failed, run1$warning) > 0) { | |
stop("Tests did not pass with devtools::test()") | |
} | |
shell: Rscript {0} | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |