Skip to content

Commit c975969

Browse files
authored
ci: move compat check to own job, add workflow dispatch (#180)
1 parent 89f8ebd commit c975969

File tree

2 files changed

+65
-35
lines changed

2 files changed

+65
-35
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -126,41 +126,6 @@ jobs:
126126
pytest pins -m 'not fs_rsc and not fs_s3 and not fs_gcs and not fs_abfs and not skip_on_github'
127127
128128
129-
check-cross-compatibility:
130-
name: "Check cross lib compatibility"
131-
runs-on: ubuntu-latest
132-
steps:
133-
- uses: actions/checkout@v2
134-
135-
- name: Install libcurl on Linux
136-
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
137-
138-
# r ---
139-
140-
- uses: r-lib/actions/setup-r@v2
141-
with:
142-
use-public-rspm: true
143-
144-
- name: Install R dependencies
145-
run: "install.packages('pins')"
146-
shell: Rscript {0}
147-
148-
# python ---
149-
150-
- uses: actions/setup-python@v2
151-
with:
152-
python-version: 3.8
153-
- name: Install py dependencies
154-
run: |
155-
python -m pip install --upgrade pip
156-
python -m pip install -r requirements/dev.txt
157-
python -m pip install -e .
158-
159-
# write and test ---
160-
161-
- name: Run script/ci-compat-check
162-
run: make ci-compat-check
163-
164129
build-docs:
165130
name: "Build Docs"
166131
runs-on: ubuntu-latest

.github/workflows/cross-compat.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Cross compatibility
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
r_pins_tag:
7+
description: "Tag or commit from pins-r (e.g. v1.0.3)"
8+
default: "__cran__"
9+
required: true
10+
push:
11+
branches: ['main', 'dev-*']
12+
pull_request:
13+
release:
14+
types: [published]
15+
16+
env:
17+
PINS_ALLOW_RSC_SHORT_NAME: 1
18+
PINS_FEATURE_PREVIEW: 1
19+
20+
jobs:
21+
check-cross-compatibility:
22+
name: "Check cross lib compatibility"
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Install libcurl on Linux
28+
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
29+
30+
# r ---
31+
32+
- uses: r-lib/actions/setup-r@v2
33+
with:
34+
use-public-rspm: true
35+
36+
- name: Install R dependencies (from CRAN)
37+
run: "install.packages('pins')"
38+
shell: Rscript {0}
39+
if: ${{ github.event.name != 'workflow_dispatch' || inputs.r_pins_tag == '__cran__' }}
40+
41+
- name: Install R dependencies (from github)
42+
run: |
43+
install.packages("remotes")
44+
remotes::install_github(paste0('rstudio/pins-r@', Sys.getenv('R_PINS_TAG')))
45+
shell: Rscript {0}
46+
env:
47+
R_PINS_TAG: ${{ inputs.r_pins_tag }}
48+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
49+
if: ${{ github.event.name == 'workflow_dispatch' && inputs.r_pins_tag != '__cran__' }}
50+
51+
# python ---
52+
53+
- uses: actions/setup-python@v2
54+
with:
55+
python-version: 3.8
56+
- name: Install py dependencies
57+
run: |
58+
python -m pip install --upgrade pip
59+
python -m pip install -r requirements/dev.txt
60+
python -m pip install -e .
61+
62+
# write and test ---
63+
64+
- name: Run script/ci-compat-check
65+
run: make ci-compat-check

0 commit comments

Comments
 (0)