-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (52 loc) · 1.72 KB
/
ci_nightly.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
45
46
47
48
49
50
51
52
53
54
name: Nightly Notebook Execution
on:
schedule:
- cron: '0 3 * * *' # run at 2 AM UTC
env:
ARCH_ON_CI: "normal"
IS_CRON: "true"
WEBBPSF_PATH: $HOME/data/webbpsf-data
PYSYN_CDBS: $PWD/grp/redcat/trds/
jobs:
gather-notebooks:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(find notebooks -name "*.ipynb" | jq -cnR '[inputs | select(length>0)]')"
nightly-notebook-execution:
needs: gather-notebooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
notebooks: ${{ fromJson(needs.gather-notebooks.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
#- run: |
# pip install -r ${${{ matrix.notebooks }}%/*}/requirements.txt
- uses: actions/checkout@v2
- name: Set up Python 3.8.12
uses: actions/setup-python@v2 ## needed for caching
with:
python-version: 3.8.12
cache: 'pip'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
#conda env update --file CIenvironment.yml --name base
pip install -r requirements.txt
pip install pytest
pip install nbval
pip install nbconvert
- name: Execute notebooks
run: |
jupyter nbconvert --template classic --to html --execute "${{ matrix.notebooks }}"
#- name: Validate notebooks
# run: |
# pytest --nbval "${{ matrix.notebooks }}"