-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (44 loc) · 1.72 KB
/
test-fetchlocal.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
# Integration tests for installing local packages
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: test-fetchlocal
permissions:
contents: read
jobs:
devtools:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Download test packages
run: |
wget https://cran.r-project.org/src/contrib/Archive/chronicler/chronicler_0.2.1.tar.gz
wget https://cran.r-project.org/src/contrib/Archive/knitr/knitr_1.43.tar.gz
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: cachix/cachix-action@v15
with:
name: rstats-on-nix
# If you chose signing key for write access
# signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# If you chose API tokens for write access OR if you have a private cache
authToken: '${{ secrets.CACHIX_AUTH }}'
- name: Build default.nix with 2 local packages
run: |
nix-shell ./inst/extdata/default.nix --run "Rscript -e \"library(rix);rix('4.3.1', local_r_pkgs = c('knitr_1.43.tar.gz', 'chronicler_0.2.1.tar.gz'), project_path = '.', overwrite = TRUE)\""
- name: Check generated default.nix
run: cat default.nix
- name: Build default.nix
run: nix-build
- name: Build default.nix with 1 local package
run: |
nix-shell ./inst/extdata/default.nix --run "Rscript -e \"library(rix);rix('4.3.1', local_r_pkgs = 'chronicler_0.2.1.tar.gz', project_path = '.', overwrite = TRUE)\""
- name: Build default.nix
run: nix-build