-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.23 KB
/
test.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
# Run notebooks to test they run without errors
name: test
# Only run on PRs and the main branch. Pushes to branches will only tested
# when a PR is opened.
on:
pull_request:
push:
branches:
- main
# Use bash by default in all jobs
defaults:
run:
shell: bash -el {0}
jobs:
#############################################################################
# Run tests and upload to codecov
test:
name: Test notebooks
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: simpeg-agrogeo24
environment-file: environment.yml
miniforge-version: latest
- name: List installed packages
run: |
mamba info
mamba list
- name: Run notebooks
run: |
jupyter-nbconvert --execute --to notebook --inplace --ExecutePreprocessor.kernel_name=python3 notebooks/*.ipynb