-
-
Notifications
You must be signed in to change notification settings - Fork 148
44 lines (36 loc) · 1.5 KB
/
test-colab.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
name: Test Colab Notebook
on:
push:
workflow_dispatch:
jobs:
test-colab-notebook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v3.5.3
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Source conda
run: source $CONDA/etc/profile.d/conda.sh
- name: Set Python to 3.10.10
run:
conda install -y python=3.10.10
- name: Install dependencies
run: |
source activate
conda init
conda install google-colab -c conda-forge
jupyter --version
pip install --upgrade nbconvert nbformat jsonschema pandas
- name: Test Google Colab Notebook with CLI shell commands
run: |
jupyter nbconvert --to notebook --execute notebooks/test-colab-notebook-cli.ipynb --output=output-cli.ipynb --ExecutePreprocessor.timeout=-1
- name: Test Google Colab Notebook with Python API commands
run: |
echo "Skipping Python API notebook due to unresolved issue"
#jupyter nbconvert --to notebook --execute notebooks/test-colab-notebook-python-api.ipynb --output=output-python-api.ipynb --ExecutePreprocessor.timeout=-1
- name: Upload Output of the Google Colab Notebook CLI
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # pin@v4.3.3
with:
name: output-cli.ipynb
path: notebooks/output-cli.ipynb
retention-days: 7