-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.42 KB
/
test-live.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
on:
schedule:
- cron: 3 6 * * 5
workflow_dispatch:
name: TestLiveSite
jobs:
test-live-site:
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
MOCK_BYPASS: true
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}
- name: Restore R package cache
uses: actions/cache@v2
with:
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ffpros-${{ hashFiles('DESCRIPTION') }}-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: |
ffpros-${{ hashFiles('DESCRIPTION') }}
ffpros-
- name: Install system dependencies
run: |
pak::local_system_requirements(execute = TRUE)
shell: Rscript {0}
- name: Install dependencies
run: |
pak::local_install_dev_deps()
shell: Rscript {0}
- name: Run Tests
run: |
print(Sys.getenv("MOCK_BYPASS"))
testthat::test_local()
shell: Rscript {0}