Update nb outputs #3
This file contains hidden or 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
| #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 |