-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (53 loc) · 1.66 KB
/
cross-compat.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
name: Cross compatibility
on:
workflow_dispatch:
inputs:
r_pins_tag:
description: "Tag or commit from pins-r (e.g. v1.0.3)"
default: "__cran__"
required: true
push:
branches: ['main', 'dev-*']
pull_request:
release:
types: [published]
env:
PINS_ALLOW_RSC_SHORT_NAME: 1
PINS_FEATURE_PREVIEW: 1
jobs:
check-cross-compatibility:
name: "Check cross lib compatibility"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libcurl on Linux
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
# r ---
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install R dependencies (from CRAN)
run: "install.packages('pins')"
shell: Rscript {0}
if: ${{ github.event.name != 'workflow_dispatch' || inputs.r_pins_tag == '__cran__' }}
- name: Install R dependencies (from github)
run: |
install.packages("remotes")
remotes::install_github(paste0('rstudio/pins-r@', Sys.getenv('R_PINS_TAG')))
shell: Rscript {0}
env:
R_PINS_TAG: ${{ inputs.r_pins_tag }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event.name == 'workflow_dispatch' && inputs.r_pins_tag != '__cran__' }}
# python ---
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install py dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/dev.txt
python -m pip install -e .
# write and test ---
- name: Run script/ci-compat-check
run: make ci-compat-check