Files
teleport/integrations/Makefile
T
Luke Okraszewski eea85f5f49 [ci] add upload of test results to s3 (#63629)
The upload steps are non-blocking, should they
fail the workflow status will not be affected.

This commit also changes the way the test logs are created,
now each Makefile accepts `TEST_LOG_DIR` as an optional parameter,
defaulting to `./test-logs`. This allows the top level Makefile
to propagate the location for the sub modules to write their
junit output, such that the CI jobs do not need to track
which top level make target corresponds to which directory.
Instead a simple glob is used to grab all the xml JUNIT files.

This approach also allows more targets to be added or removed in the future
without modifying the CI job definitons. Another benefit is allowing
the caller to modify the output destination should we want to bundle
the files as job artifacts in the future.

Makes `TEST_LOG_DIR` an order only dep for all targets.
2026-02-20 14:23:25 +00:00

27 lines
976 B
Makefile

TEST_LOG_DIR ?= ${abspath ./test-logs}
.PHONY: test
test: test-access test-lib test-event-handler test-terraform-provider test-terraform-provider-mwi
$(TEST_LOG_DIR):
mkdir $(TEST_LOG_DIR)
.PHONY: test-access
test-access: | $(TEST_LOG_DIR)
gotestsum --junitfile $(TEST_LOG_DIR)/unit-tests-integrations-access.xml --jsonfile $(TEST_LOG_DIR)/unit-tests-integrations-access.json ./access/...
.PHONY: test-lib
test-lib: | $(TEST_LOG_DIR)
gotestsum --junitfile $(TEST_LOG_DIR)/unit-tests-integrations-lib.xml --jsonfile $(TEST_LOG_DIR)/unit-tests-integrations-lib.json ./lib/...
.PHONY: test-event-handler
test-event-handler: | $(TEST_LOG_DIR)
make -C event-handler test TEST_LOG_DIR=$(TEST_LOG_DIR)
.PHONY: test-terraform-provider
test-terraform-provider: | $(TEST_LOG_DIR)
make -C terraform test TEST_LOG_DIR=$(TEST_LOG_DIR)
.PHONY: test-terraform-provider-mwi
test-terraform-provider-mwi: | $(TEST_LOG_DIR)
make -C terraform-mwi test TEST_LOG_DIR=$(TEST_LOG_DIR)