-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (48 loc) · 1.58 KB
/
test.yml
File metadata and controls
53 lines (48 loc) · 1.58 KB
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
#Test against conda distribution of StructuralGT
name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
# Trigger on pull requests.
pull_request:
# Trigger on pushes to the mainline branches. This prevents building commits twice when the pull
# request source branch is in the same repository.
push:
branches:
- "main"
# Trigger on request.
workflow_dispatch:
jobs:
execute_notebooks:
name: Execute notebooks, Python ${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
with:
path: StructuralGT-examples
# Important! All steps that use the conda environment should define "shell: bash -l {0}".
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channel-priority: flexible
activate-environment: StructuralGT-examples
environment-file: StructuralGT-examples/environment.yml
- name: Display StructuralGT version
shell: bash -l {0}
run: |-
python3 -c "import StructuralGT; print(StructuralGT.__version__)"
# clone the tutorials and run them
- name: List notebooks
run: ls **/*.ipynb
working-directory: StructuralGT-examples
- name: Run notebook execution tests
shell: bash -l {0}
run: |-
python3 -m pytest -v --nbval --nbval-lax --ignore=archive/
working-directory: StructuralGT-examples