Skip to content

Commit 4053f5e

Browse files
Add CI based on fem-on-colab/open-in-colab-workflow
1 parent 96d0c09 commit 4053f5e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: "0 0 * * WED"
12+
workflow_dispatch:
13+
14+
jobs:
15+
test_colab:
16+
uses: fem-on-colab/open-in-colab-workflow/.github/workflows/workflow_call.yml@main
17+
with:
18+
work_directory: notebooks_copy
19+
notebook_pattern: "**/*.ipynb"
20+
notebook_preparation: |
21+
rsync -avz --include="*.ipynb" --exclude="*" . notebooks_copy/
22+
test_script: |
23+
python3 -m pytest --nbval notebooks_copy
24+
publish_on: artifact@notebooks
25+
26+
warn:
27+
runs-on: ubuntu-latest
28+
if: github.repository == 'firedrakeproject/notebooks' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
29+
steps:
30+
- name: Warn if scheduled workflow is about to be disabled
31+
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main
32+
with:
33+
workflow-filename: ci.yml
34+
days-elapsed: 50

0 commit comments

Comments
 (0)