-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.37 KB
/
Copy pathci.yml
File metadata and controls
63 lines (52 loc) · 1.37 KB
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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
container:
image: rocker/geospatial:4.5.2
env:
RENV_PATHS_CACHE: /renv-cache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache renv library
uses: actions/cache@v4
with:
path: |
renv/library
/renv-cache
key: renv-${{ runner.os }}-${{ hashFiles('renv.lock') }}
restore-keys: |
renv-${{ runner.os }}-
- name: Install system dependencies
run: |
apt-get update -qq
apt-get install -y --no-install-recommends \
libgit2-dev \
libsodium-dev
- name: Restore renv packages
run: |
R -q -e "renv::restore(prompt = FALSE)"
- name: Run tests
run: |
R -q -e "testthat::test_dir('tests/testthat')"
- name: Run pipeline
run: |
R -q -e "targets::tar_make()"
- name: Validate pipeline outputs
run: |
R -q -e "
targets::tar_load(cv_summary)
cat('CV Summary:\n')
print(cv_summary)
stopifnot(nrow(cv_summary) > 0)
cat('\nPipeline validation passed.\n')
"