Skip to content

Commit b2656fb

Browse files
authored
Update build pipeline for tutorials (#28)
* Update workflow dependencies for build jobs * Enhance build configuration and update project description - Run pytest with 4 parallel jobs - Update project description for clarity - Change conda channels to use prefix.dev - Fix task dependencies in pixi.toml - Update pytest version to 8.1.0beta2 * Run tests in parallel * Only run tutorial tests * Update cache-write condition in build workflow for improved event handling
1 parent 25e00ce commit b2656fb

3 files changed

Lines changed: 2762 additions & 4759 deletions

File tree

.github/workflows/build.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- uses: prefix-dev/setup-pixi@v0.8.1
3737
with:
3838
cache: true
39-
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
39+
cache-write: ${{ contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && github.ref_name == 'master' }}
4040

4141
- run: pixi run sphinx-build -M linkcheck . _build -W --keep-going -a -q
4242

@@ -60,6 +60,11 @@ jobs:
6060

6161
test-latest:
6262
runs-on: windows-latest
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
test_group: [1, 2, 3, 4, 5, 6, 7, 8]
67+
6368

6469
steps:
6570
- uses: actions/checkout@v4
@@ -80,8 +85,6 @@ jobs:
8085
ref: ammr4-beta
8186
path: ammr4
8287

83-
84-
8588
- name: Link AMMR
8689
shell: cmd
8790
run: |
@@ -100,15 +103,17 @@ jobs:
100103
if: ${{ !github.event.pull_request.head.repo.fork && github.repository == 'anybody/tutorials' }}
101104
run: |
102105
cd tutorials
103-
pytest
106+
pytest -n auto --dist worksteal `
107+
--splits 8 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration
108+
104109
env:
105110
RLM_LICENSE: ${{ secrets.LICENSE_TEST_SERVER }}
106111
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_TEST_SERVER_PASSWORD }}
107112

108113
build-latest:
109114

110115
runs-on: ubuntu-latest
111-
needs: [link-check, test-latest]
116+
needs: [link-check]
112117

113118
steps:
114119
- uses: actions/checkout@v4
@@ -155,7 +160,7 @@ jobs:
155160
path: _build/html
156161

157162
prepare-pages:
158-
needs: [build-latest, build-tagged]
163+
needs: [build-latest, build-tagged, test-latest]
159164
runs-on: ubuntu-latest
160165
steps:
161166
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)