|
| 1 | +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples |
| 2 | +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
1 | 3 | on:
|
2 | 4 | push:
|
3 |
| - branches: |
4 |
| - - main |
5 |
| - - master |
| 5 | + branches: [main, master] |
6 | 6 | pull_request:
|
7 |
| - branches: |
8 |
| - - main |
9 |
| - - master |
| 7 | + branches: [main, master] |
10 | 8 |
|
11 | 9 | name: test-coverage
|
12 | 10 |
|
13 | 11 | jobs:
|
14 | 12 | test-coverage:
|
15 |
| - runs-on: macOS-latest |
| 13 | + runs-on: ubuntu-latest |
16 | 14 | env:
|
17 | 15 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
| 16 | + |
18 | 17 | steps:
|
19 |
| - - uses: actions/checkout@v2 |
| 18 | + - uses: actions/checkout@v3 |
20 | 19 |
|
21 | 20 | - uses: r-lib/actions/setup-r@v2
|
22 |
| - |
23 |
| - - uses: r-lib/actions/setup-pandoc@v2 |
24 |
| - |
25 |
| - - name: Query dependencies |
26 |
| - run: | |
27 |
| - install.packages('remotes') |
28 |
| - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) |
29 |
| - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") |
30 |
| - shell: Rscript {0} |
31 |
| - |
32 |
| - - name: Cache R packages |
33 |
| - uses: actions/cache@v2 |
34 | 21 | with:
|
35 |
| - path: ${{ env.R_LIBS_USER }} |
36 |
| - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} |
37 |
| - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- |
| 22 | + use-public-rspm: true |
38 | 23 |
|
39 |
| - - name: Install dependencies |
40 |
| - run: | |
41 |
| - install.packages(c("remotes")) |
42 |
| - remotes::install_deps(dependencies = TRUE) |
43 |
| - remotes::install_cran("covr") |
44 |
| - shell: Rscript {0} |
| 24 | + - uses: r-lib/actions/setup-r-dependencies@v2 |
| 25 | + with: |
| 26 | + extra-packages: any::covr |
| 27 | + needs: coverage |
45 | 28 |
|
46 | 29 | - name: Test coverage
|
47 |
| - run: covr::codecov() |
| 30 | + run: covr::codecov(quiet = FALSE) |
48 | 31 | shell: Rscript {0}
|
0 commit comments