generated from pangeo-gallery/example-gallery
-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (50 loc) · 1.54 KB
/
validate.yaml
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
name: validate
on:
push:
branches:
- master
paths:
- '**.ipynb'
pull_request:
branches:
- master
paths:
- '**.ipynb'
jobs:
build:
name: validate notebooks
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: setup env
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: cmip6env
channels: conda-forge
mamba-version: "*"
channel-priority: strict
auto-update-conda: false
environment-file: environment.yml
auto-activate-base: false
- name: verify env
run: |
conda info
conda list
- name: get changed ipynb files
id: changed-ipynb-files
uses: tj-actions/changed-files@v44
with:
files: |
**.ipynb
- name: validate all changed ipynb files
if: steps.changed-ipynb-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-ipynb-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
papermill -k cmip6env $file -
done