.circleci/config.yml: collect test metadata (#2211)

* .circleci/config.yml: collect test metadata

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Store frontend test results too

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2020-06-04 09:49:32 +02:00 committed by GitHub
parent e0cc523893
commit 9c3ee38683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -27,6 +27,8 @@ jobs:
name: Generate front-end code
command: make all
working_directory: ~/project/ui/app
environment:
JUNIT_DIR: ~/test-results
- run:
name: Generate assets
command: make assets
@ -34,6 +36,8 @@ jobs:
name: Generate API v2 code
command: make apiv2
- run: git diff --exit-code
- store_test_results:
path: ~/test-results
test:
docker:
@ -92,7 +96,8 @@ jobs:
file: amtool
- go/save-cache:
key: v1-go-mod
- store_test_results:
path: test-results
workflows:
version: 2

View File

@ -9,6 +9,8 @@ TEMPFILE := $(shell mktemp ./elm-XXXXXXXXXX)
# --output flag for elm make must end in .js or .html.
TEMPFILE_JS := "$(TEMPFILE).js"
TEMPOPENAPI := $(shell mktemp -d ./openapi-XXXXXXXXXX)
# If JUNIT_DIR is set, the tests are executed with the JUnit reporter and the result is stored in the given directory.
JUNIT_DIR ?=
ifeq ($(NO_DOCKER), true)
DOCKER_CMD=
@ -29,7 +31,12 @@ format: elm-env $(ELM_FILES)
test: src/Data elm-env
@$(DOCKER_CMD) rm -rf elm-stuff/generated-code
@$(DOCKER_CMD) elm-format $(ELM_FILES) --validate
ifneq ($(JUNIT_DIR),)
mkdir -p $(JUNIT_DIR)
@$(DOCKER_CMD) elm-test --report=junit | tee $(JUNIT_DIR)/junit.xml
else
@$(DOCKER_CMD) elm-test
endif
dev-server:
elm reactor