-
Notifications
You must be signed in to change notification settings - Fork 373
41 lines (38 loc) · 1.06 KB
/
unit-test-spec.yml
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
name: Spec
on:
workflow_call:
inputs:
spec:
required: true
type: string
jobs:
matrix:
runs-on: ubuntu-latest
container:
image: "ruby:3.3"
name: Prepare matrix
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Compute matrix
id: matrix
run: |
matrix="$(ruby matrix.rb --json engines spec:${{ inputs.spec }})"
echo "${matrix}" | ruby -rjson -0777 -ne 'puts JSON.pretty_generate JSON.parse($_)'
echo "matrix=${matrix}" >> $GITHUB_OUTPUT
test:
runs-on: ubuntu-latest
name: "${{ matrix.engine.name }}:${{ matrix.engine.version }} (${{ matrix.spec }})"
needs: matrix
strategy:
fail-fast: false
matrix:
spec:
- ${{ inputs.spec }}
engine: ${{ fromJSON(needs.matrix.outputs.matrix) }}
uses: ./.github/workflows/unit-test/engine.yml
with:
spec: ${{ matrix.spec }}
engine_name: ${{ matrix.engine.name }}
engine_version: ${{ matrix.engine.version }}