@@ -112,21 +112,48 @@ jobs:
112112 name : Check operator CRDs
113113 runs-on : ubuntu-latest
114114 steps :
115- - name : Checkout
116- uses : actions/checkout@v4
117- - name : Make manifests
118- env :
119- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120- run : make -C operator manifests
121- - name : Check CRDs
122- run : |
123- git diff --exit-code --name-only
124- if [ $? -eq 0 ]; then
125- echo "CRDs are up to date"
126- else
127- echo "CRDs are out of date"
128- exit 1
129- fi
115+ - name : Checkout
116+ uses : actions/checkout@v4
117+ - name : Setup go
118+ uses : actions/setup-go@v5
119+ with :
120+ go-version-file : go.mod
121+ cache-dependency-path : " **/*.sum"
122+ - name : Make manifests
123+ env :
124+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
125+ run : make -C operator manifests
126+ - name : Check CRDs
127+ run : |
128+ git diff --exit-code --name-only
129+ if [ $? -eq 0 ]; then
130+ echo "CRDs are up to date"
131+ else
132+ echo "CRDs are out of date"
133+ exit 1
134+ fi
135+
136+ check-swagger-docs :
137+ name : Check swagger docs
138+ runs-on : ubuntu-latest
139+ steps :
140+ - name : Checkout
141+ uses : actions/checkout@v4
142+ - name : Setup go
143+ uses : actions/setup-go@v5
144+ with :
145+ go-version-file : go.mod
146+ cache-dependency-path : " **/*.sum"
147+ - name : Check swagger docs
148+ run : |
149+ make -C api swagger
150+ git diff --exit-code --name-only
151+ if [ $? -eq 0 ]; then
152+ echo "Swagger docs are up to date"
153+ else
154+ echo "Swagger docs are out of date"
155+ exit 1
156+ fi
130157
131158 buildtools :
132159 name : Build buildtools
@@ -174,6 +201,11 @@ jobs:
174201 go-version-file : go.mod
175202 cache-dependency-path : " **/*.sum"
176203
204+ - name : Setup node
205+ uses : actions/setup-node@v4
206+ with :
207+ node-version-file : ./web/.nvmrc
208+
177209 - uses : oras-project/setup-oras@v1
178210
179211 -
uses :
imjasonh/[email protected] @@ -248,6 +280,11 @@ jobs:
248280 go-version-file : go.mod
249281 cache-dependency-path : " **/*.sum"
250282
283+ - name : Setup node
284+ uses : actions/setup-node@v4
285+ with :
286+ node-version-file : ./web/.nvmrc
287+
251288 - uses : oras-project/setup-oras@v1
252289
253290 -
uses :
imjasonh/[email protected] @@ -357,6 +394,11 @@ jobs:
357394 go-version-file : go.mod
358395 cache-dependency-path : " **/*.sum"
359396
397+ - name : Setup node
398+ uses : actions/setup-node@v4
399+ with :
400+ node-version-file : ./web/.nvmrc
401+
360402 - uses : oras-project/setup-oras@v1
361403
362404 -
uses :
imjasonh/[email protected] @@ -817,6 +859,7 @@ jobs:
817859 - dryrun-tests
818860 - check-images
819861 - check-operator-crds
862+ - check-swagger-docs
820863 if : always()
821864 steps :
822865 # https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
@@ -841,5 +884,8 @@ jobs:
841884 - name : fail if check-operator-crds job was not successful
842885 if : needs.check-operator-crds.result != 'success'
843886 run : exit 1
887+ - name : fail if check-swagger-docs job was not successful
888+ if : needs.check-swagger-docs.result != 'success'
889+ run : exit 1
844890 - name : succeed if everything else passed
845891 run : echo "Validation succeeded"
0 commit comments