Switch to unified view

a b/.github/workflows/test-coverage.yaml
1
on:
2
  push:
3
    branches:
4
      - main
5
      - master
6
7
name: test-coverage
8
9
jobs:
10
  test-coverage:
11
    runs-on: macOS-latest
12
    env:
13
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14
    steps:
15
      - uses: actions/checkout@v2
16
17
      - uses: r-lib/actions/setup-r@v1
18
19
      - uses: r-lib/actions/setup-pandoc@v1
20
21
      - name: Query dependencies
22
        run: |
23
          install.packages('remotes')
24
          saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
25
          writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
26
        shell: Rscript {0}
27
28
      - name: Restore R package cache
29
        uses: actions/cache@v2
30
        with:
31
          path: ${{ env.R_LIBS_USER }}
32
          key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
33
          restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
34
35
      - name: Install dependencies
36
        run: |
37
          install.packages(c("remotes"))
38
          remotes::install_deps(dependencies = TRUE)
39
          remotes::install_cran("covr")
40
        shell: Rscript {0}
41
42
      - name: Test coverage
43
        run: covr::codecov()
44
        shell: Rscript {0}