Skip to content

Commit

Permalink
add GHA workflow without fixtures (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle authored Apr 29, 2022
1 parent 9ece479 commit 2bd1868
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
runs-on: windows-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-no-fixtures.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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:
schedule:
- cron: '0 0 * * *'

name: test-without-fixtures

jobs:
test-without-fixtures:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- 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

0 comments on commit 2bd1868

Please sign in to comment.