1- name : CI
1+ name : SDK CI
22
33env :
44 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
1010 - master
1111 - " codex/**"
1212 pull_request :
13+ workflow_dispatch :
14+
15+ concurrency :
16+ group : sdk-ci-${{ github.ref }}
17+ cancel-in-progress : true
1318
1419jobs :
15- runtime-matrix :
16- name : Runtime Matrix
20+ prepare :
21+ name : Prepare Matrices
1722 runs-on : ubuntu-latest
1823 outputs :
19- matrix : ${{ steps.matrix.outputs.matrix }}
24+ runtime_matrix : ${{ steps.runtime-matrix.outputs.matrix }}
25+ coverage_matrix : ${{ steps.coverage-matrix.outputs.matrix }}
2026 steps :
2127 - uses : actions/checkout@v6
2228 - uses : actions/setup-node@v6
2329 with :
2430 node-version : 22
25- - id : matrix
31+ - id : runtime- matrix
2632 run : echo "matrix=$(node SDK/scripts/runtime-matrix.mjs --compact)" >> "$GITHUB_OUTPUT"
33+ - id : coverage-matrix
34+ run : echo "matrix=$(node SDK/scripts/runtime-matrix.mjs --coverage --compact)" >> "$GITHUB_OUTPUT"
35+
36+ quality :
37+ name : Quality Gates
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v6
41+ - uses : actions/setup-node@v6
42+ with :
43+ node-version : 22
44+ - uses : actions/setup-dotnet@v5
45+ with :
46+ dotnet-version : 10.0.x
47+ - run : npm ci
48+ - run : npm ci --prefix SDK/js
49+ - run : dotnet restore SDK/dotnet/ManagedCode.Tps.slnx
50+ - run : npm run build:site
51+ - run : dotnet format SDK/dotnet/ManagedCode.Tps.slnx --verify-no-changes
52+ - run : dotnet build SDK/dotnet/ManagedCode.Tps.slnx -c Release -warnaserror --no-restore
2753
2854 runtimes :
2955 name : Runtime ${{ matrix.runtime.language }}
30- needs : runtime-matrix
56+ needs : prepare
3157 runs-on : ${{ matrix.runtime.runner }}
3258 strategy :
3359 fail-fast : false
3460 matrix :
35- runtime : ${{ fromJson(needs.runtime-matrix .outputs.matrix ) }}
61+ runtime : ${{ fromJson(needs.prepare .outputs.runtime_matrix ) }}
3662 steps :
3763 - uses : actions/checkout@v6
3864 - if : matrix.runtime.setup == 'node' || matrix.runtime.setup == 'dotnet'
@@ -57,21 +83,46 @@ jobs:
5783 - run : ${{ matrix.runtime.build }}
5884 - run : ${{ matrix.runtime.test }}
5985
60- quality :
61- name : Quality
62- runs-on : ubuntu-latest
86+ coverage :
87+ name : Coverage ${{ matrix.runtime.language }}
88+ needs : prepare
89+ runs-on : ${{ matrix.runtime.runner }}
90+ strategy :
91+ fail-fast : false
92+ matrix :
93+ runtime : ${{ fromJson(needs.prepare.outputs.coverage_matrix) }}
6394 steps :
6495 - uses : actions/checkout@v6
65- - uses : actions/setup-node@v6
96+ - if : matrix.runtime.setup == 'node' || matrix.runtime.setup == 'dotnet'
97+ uses : actions/setup-node@v6
6698 with :
6799 node-version : 22
68- - uses : actions/setup-dotnet@v5
100+ - if : matrix.runtime.setup == 'dotnet'
101+ uses : actions/setup-dotnet@v5
69102 with :
70103 dotnet-version : 10.0.x
71- - run : npm ci
72- - run : npm ci --prefix SDK/js
73- - run : dotnet restore SDK/dotnet/ManagedCode.Tps.slnx
74- - run : npm run build:site
75- - run : dotnet format SDK/dotnet/ManagedCode.Tps.slnx --verify-no-changes
76- - run : dotnet build SDK/dotnet/ManagedCode.Tps.slnx -warnaserror --no-restore
77- - run : dotnet test SDK/dotnet/ManagedCode.Tps.slnx --no-build --no-restore
104+ - if : matrix.runtime.setup == 'dart'
105+ uses : dart-lang/setup-dart@v1
106+ - if : matrix.runtime.setup == 'java'
107+ uses : actions/setup-java@v4
108+ with :
109+ distribution : temurin
110+ java-version : " 17"
111+ - if : matrix.runtime.setup == 'node'
112+ run : npm ci --prefix SDK/js
113+ - if : matrix.runtime.setup == 'dotnet'
114+ run : dotnet restore SDK/dotnet/ManagedCode.Tps.slnx
115+ - run : ${{ matrix.runtime.build }}
116+ - run : ${{ matrix.runtime.coverage }}
117+ - name : Coverage Policy
118+ run : |
119+ {
120+ echo "## Coverage Policy"
121+ echo ""
122+ echo "- TypeScript: minimum 90% statements, branches, functions, and lines"
123+ echo "- JavaScript: minimum 90% statements, branches, functions, and lines"
124+ echo "- C#: minimum 90% line, branch, and method coverage"
125+ echo "- Flutter: minimum 90% line coverage for SDK source files"
126+ echo "- Swift: minimum 90% line coverage for SDK source files"
127+ echo "- Java: minimum 90% line coverage for SDK source files"
128+ } >> "$GITHUB_STEP_SUMMARY"
0 commit comments