-
Notifications
You must be signed in to change notification settings - Fork 17
69 lines (65 loc) · 2.17 KB
/
backfill-corr-ci.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
name: R backfill corrections
on:
push:
branches: [ main, prod ]
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
branches: [ main, prod ]
jobs:
build:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
strategy:
matrix:
r-version: [4.2.1]
defaults:
run:
working-directory: backfill_corrections/delphiBackfillCorrection
steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
use-public-rspm: true
- name: Install linux dependencies
run: |
sudo apt-get install \
libcurl4-openssl-dev \
libgdal-dev \
libudunits2-dev \
libglpk-dev \
libharfbuzz-dev \
libfribidi-dev
- name: Get date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-backfillcorr-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-r-backfillcorr-
- name: Install and cache dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
working-directory: backfill_corrections/delphiBackfillCorrection
upgrade: 'TRUE'
- name: Check package
uses: r-lib/actions/check-r-package@v2
with:
working-directory: backfill_corrections/delphiBackfillCorrection
args: 'c("--no-manual", "--test-dir=unit-tests")'
error-on: '"error"'