From acaae50c4e23699138f7d9e7f6fe45447bea0950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 18 Oct 2019 15:41:15 +0100 Subject: [PATCH] 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 --- .travis.yml | 12 ++++++++++++ Makefile | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index eae8d46f9..6fe164d6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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) diff --git a/Makefile b/Makefile index e3dab2ad5..03dde31a8 100644 --- a/Makefile +++ b/Makefile @@ -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)