-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (58 loc) · 2.2 KB
/
exploratory-notebooks-test-osx.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
55
56
57
58
59
60
61
62
63
64
65
name: exploratory-notebook-test-osx
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '5 4 * * 0'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
env:
EXP_CONDA_VER: 23.1.0
SOURCE_SCRIPT: /Users/runner/miniconda-23.1.0/etc/profile.d/conda.sh
PLATFORM: MacOSX-x86_64
# We run only on macos here since the repo2docker tests will run on ubuntu
runs-on: macos-latest
strategy:
matrix:
target: [Data_exploration_template.ipynb,
timeline_train_bus_ebike_mtv_ucb.ipynb,
timeline_car_scooter_brex_san_jose.ipynb,
timeline_unimodal_car_bike_los_altos.ipynb]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install miniconda + the emissioneval environment
shell: bash -l {0}
run: |
source setup/setup_conda.sh $EXP_CONDA_VER $PLATFORM
source setup/setup.sh
conda activate emissioneval
- name: Test the interactive timeline
id: run-test
shell: bash -l {0}
run: |
source $SOURCE_SCRIPT
conda activate emissioneval
conda env list
python bin/run_notebooks.py ${{ matrix.target }}
- name: Generate failure output file
id: print-out-file-name
if: failure()
run: |
OUT_FILENAME=`echo ${{ matrix.target }} | sed "s/.ipynb/_out.ipynb/"`
echo "output filename = $OUT_FILENAME"
echo "::set-output name=OUT_FILENAME::${OUT_FILENAME}"
- name: Upload result for the interactive timeline
uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{ steps.print-out-file-name.outputs.OUT_FILENAME }}
path: ./${{ steps.print-out-file-name.outputs.OUT_FILENAME }}