-
Notifications
You must be signed in to change notification settings - Fork 24
42 lines (36 loc) · 1.07 KB
/
tutorials.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
name: "Test tutorials"
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
schedule:
- cron: "0 0 * * 0" # Every Sunday at midnight
jobs:
tutorial-1:
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
steps:
- name: "Check out"
uses: actions/checkout@v2
- name: "Install dependencies with Mamba"
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: devtools/conda-envs/test-tutorials.yml
miniforge-variant: Mambaforge
python-version: 3.7 # Mimics Google Colab
- name: "List conda packages"
run: conda list
- name: "Convert the tutorial"
run: |
jupyter nbconvert --to python --stdout tutorials/openmm-torch-nnpops.ipynb > test.py
sed -i '/condacolab/d' test.py # Remove conda-colab
sed -i 's#&> /dev/null##g' test.py # Remove the output redirection
cat test.py
- name: "Run the tutorial"
run: ipython test.py