-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (39 loc) · 1.22 KB
/
test-coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
branches:
- master
pull_request:
branches:
- master
name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NOT_CRAN: true
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: "release"
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2
- name: Set EPWSHIFTR_CHECK_CACHE
shell: bash
run: |
echo "EPWSHIFTR_CHECK_CACHE=${{ runner.temp }}/epwshiftr" >> $GITHUB_ENV
if [ ! -d "${{ runner.temp }}/epwshiftr" ]; then mkdir -p "${{ runner.temp }}/epwshiftr"; fi
- name: Cache NetCDF files
uses: actions/cache@v2
with:
path: ${{ env.EPWSHIFTR_CHECK_CACHE }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('DESCRIPTION') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}