Skip to content

Separate environments for each talktorial #1447

Separate environments for each talktorial

Separate environments for each talktorial #1447

Workflow file for this run

name: CI
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
- "dev"
schedule:
# every two weeks on Monday at 3 am
- cron: "0 3/336 * * 1"
jobs:
test:
name: Pytest
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
env:
PACKAGE: teachopencadd
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: teachopencadd
environment-file: devtools/test_env.yml
- name: Run Talktorials
shell: bash -el {0}
run: |
python devtools/test_talktorials.py
- name: Cache Conda packages
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-
restore-keys: |
${{ runner.os }}-conda-
format:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install format dependencies
run: python -m pip install 'black<23.1.0' black-nb shyaml
- name: Run black-nb
run: |
black-nb -l 99 --check teachopencadd/talktorials/T*/talktorial.ipynb
readmes:
name: READMEs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install nbformat
run: python -m pip install nbformat shyaml
- name: Check READMEs are up-to-date
run: |
for path in teachopencadd/talktorials/T*/talktorial.ipynb; do
python devtools/regenerate_readmes.py --output README.md $path
done
# If the script above introduced changes (it shouldn't!), git diff will have output and an error code
git diff --exit-code