feat(ci): rebuild openapi client code in CI and check for differences

This ensures that we fail CI if the openapi client code that's commited to git is different than what the current code would generate
This commit is contained in:
Łukasz Mierzwa
2019-10-18 15:41:15 +01:00
parent fc81561bd3
commit acaae50c4e
2 changed files with 16 additions and 0 deletions

View File

@@ -107,6 +107,18 @@ jobs:
<<: *DEFAULTS_JS
script: make lint-docs
- stage: Lint
name: Verify OpenAPI client code
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)
language: generic
addons:
apt:
packages:
- docker-ce
script:
- travis_retry make openapi-client
- git diff --exit-code
- stage: Snapshots
name: Percy UI snapshots
if: (repo = prymitive/karma AND type != pull_request) OR (repo != prymitive/karma AND type = pull_request)

View File

@@ -167,6 +167,10 @@ format-go: .build/deps-build-go.ok
format-js: .build/deps-build-node.ok
cd ui && ./node_modules/.bin/prettier --write 'src/**/*.js'
.PHONY: openapi-client
openapi-client:
for f in $(wildcard internal/mapper/*/Dockerfile) ; do $(MAKE) -C `dirname "$$f"` ; done
.PHONY: show-version
show-version:
@echo $(VERSION)