Repository navigation
57 lines (53 loc) · 2.14 KB
/
Copy pathcodegen.yml
File metadata and controls
57 lines (53 loc) · 2.14 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: codegen
# Codegen CI/CD for emass_client.
#
# On spec changes (and nightly), regenerate the client with the pinned
# openapi-generator 7.12.0 toolchain and diff it against the committed client.
# The committed client was generated from a custom openapi-generator rust
# template; see REGEN_NOTES.md for the customization-recovery spec. This job
# is a drift guard: if the spec changes, the divergent set changes and the
# client must be regenerated + re-recovered before the spec lands.
on:
push:
paths:
- spec/eMASSRestOpenApi.yaml
workflow_dispatch:
schedule:
- cron: '17 3 * * *'
permissions:
contents: read
jobs:
regen-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Install openapi-generator-cli 7.12.0
run: |
curl -fsSL -o openapi-generator-cli-7.12.0.jar \
"https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar"
ls -la openapi-generator-cli-7.12.0.jar
# Blocking drift guard: regenerate from the COMMITTED custom template +
# patched generator class and assert byte-for-byte parity (196/196)
# against the committed client. Catches decay in the template or patch.
# See REGEN_NOTES.md and the repo-local ./regen.sh 'verify' mode.
- name: Assert 196/196 regeneration parity (custom template)
env:
JAVA_HOME: ${{ env.JAVA_HOME }}
OGCJAR: ${{ github.workspace }}/openapi-generator-cli-7.12.0.jar
run: |
chmod +x regen.sh
bash regen.sh verify
# Informational only: regenerate from STOCK openapi-generator 7.12.0 and
# show the divergent set (always reports the ~53 custom-template files).
- name: Regenerate from stock 7.12.0 (informational drift)
env:
JAVA_HOME: ${{ env.JAVA_HOME }}
OGCJAR: ${{ github.workspace }}/openapi-generator-cli-7.12.0.jar
run: |
chmod +x regen_client.sh
bash regen_client.sh summary