forked from openmm/openmm-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.48 KB
/
ci-main.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
name: CI - main branch
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:
schedule:
# Nightly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * *"
jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python:
- 3.7
env:
CI_OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 2
- uses: conda-incubator/setup-miniconda@v2.1.1
name: Install dependencies
with:
python-version: ${{ matrix.python }}
environment-file: environment.yml
auto-activate-base: false
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true
- name: Describe environment
run: |
pwd
ls
conda list
- name: Run example notebooks
shell: bash -l {0}
# --nbval-lax: Only check output when cell is marked
# https://nbval.readthedocs.io/en/latest/#Using-tags-instead-of-comments
run: pytest -v --nbval-lax notebooks/cookbook