Skip to content

Commit 0740085

Browse files
committed
ci: generate one job per session
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 6fd3904 commit 0740085

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,32 @@ env:
1111
FORCE_COLOR: 3
1212

1313
jobs:
14+
generate-jobs:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
session: ${{ steps.set-matrix.outputs.session }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: henryiii/nox@henryiii/feat/json
21+
- id: set-matrix
22+
run: |
23+
MATRIX=$(
24+
nox --json -l | jq -c '[.[].session]'
25+
)
26+
echo "session=$MATRIX" | tee --append $GITHUB_OUTPUT
27+
1428
checks:
29+
needs: [generate-jobs]
1530
runs-on: ${{ matrix.runs-on }}
1631
strategy:
1732
fail-fast: false
1833
matrix:
1934
runs-on: [ubuntu-latest, macos-latest, windows-latest]
35+
session: ${{ fromJson(needs.generate-jobs.outputs.session) }}
2036

2137
name: Check on ${{ matrix.runs-on }}
2238

2339
steps:
2440
- uses: actions/checkout@v3
25-
- uses: wntrblm/nox@main
26-
- run: nox
41+
- uses: wntrblm/nox@2022.11.21
42+
- run: nox -s '${{ matrix.session }}'

0 commit comments

Comments
 (0)