CI - main branch #432
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
with: | |
fetch-depth: 2 | |
- uses: conda-incubator/[email protected] | |
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 |