Skip to content

Commit d3ce494

Browse files
committed
ci: give generation its own job ahead of the checks
1 parent 1c749e1 commit d3ce494

1 file changed

Lines changed: 24 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ on:
1414
name: CI
1515

1616
jobs:
17-
# Generated once here and handed to the checks below, so they neither repeat
18-
# the generation nor disagree about what they are checking. The artifact name
19-
# carries the language because a spec run shares one namespace across SDKs.
20-
build:
17+
generate:
2118
runs-on: ubuntu-latest
2219
steps:
2320
- uses: actions/checkout@v7
@@ -33,13 +30,33 @@ jobs:
3330

3431
- run: bash ./generate.sh openapi-legacy.yaml
3532

36-
- uses: actions/upload-artifact@v5
33+
- uses: actions/upload-artifact@v7
3734
with:
3835
name: generated-java
3936
path: .
37+
include-hidden-files: true
38+
39+
build:
40+
needs: generate
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
java: ['17', '21']
45+
steps:
46+
- uses: actions/download-artifact@v8
47+
with:
48+
name: generated-java
49+
50+
- uses: actions/setup-java@v5.7.0
51+
with:
52+
java-version: ${{ matrix.java }}
53+
distribution: temurin
54+
cache: maven
55+
56+
- run: mvn -B compile --no-transfer-progress
4057

41-
package:
42-
needs: build
58+
test:
59+
needs: generate
4360
runs-on: ubuntu-latest
4461
strategy:
4562
matrix:

0 commit comments

Comments
 (0)