diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd26da68f..250975a48 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,4 +43,5 @@ jobs: - name: Test and create coverage report run: | make test-unit-cover + make test-unit-e2e if: env.GIT_DIFF diff --git a/Makefile b/Makefile index fc5022dff..939995500 100644 --- a/Makefile +++ b/Makefile @@ -305,9 +305,10 @@ test-all: test-unit test-race # we want to include all unit tests in the subfolders (tests/e2e/*) # We also want to exclude the testutil folder because it contains only # helper functions for the tests. -PACKAGES_UNIT=$(shell go list ./... | grep -v '/tests/e2e$$' | grep -v 'testutil') +PACKAGES_UNIT=$(shell go list ./... | grep -v '/tests/e2e' | grep -v 'testutil') +PACKAGES_UNIT_E2E=$(shell go list ./... | grep '/tests/e2e') TEST_PACKAGES=./... -TEST_TARGETS := test-unit test-unit-cover test-race +TEST_TARGETS := test-unit test-unit-cover test-race test-unit-e2e # Test runs-specific rules. To add a new test target, just add # a new rule, customise ARGS or TEST_PACKAGES ad libitum, and @@ -322,6 +323,9 @@ $(TEST_TARGETS): run-tests test-unit-cover: ARGS=-timeout=15m -coverprofile=cover.out -covermode=atomic -gcflags=all=-l --tags devmode test-unit-cover: TEST_PACKAGES=$(PACKAGES_UNIT) +test-unit-e2e: ARGS=-timeout=15m --tags devmode +test-unit-e2e: TEST_PACKAGES=$(PACKAGES_UNIT_E2E) + test-e2e: @if [ -z "$(TARGET_VERSION)" ]; then \ echo "Building docker image from local codebase"; \ @@ -634,4 +638,4 @@ check-licenses: @python3 scripts/check_licenses.py . swagger-ui: - docker run -p 8080:8080 -e SWAGGER_JSON=/app/swagger.json -v $(pwd)/client/docs/swagger-ui:/app swaggerapi/swagger-ui \ No newline at end of file + docker run -p 8080:8080 -e SWAGGER_JSON=/app/swagger.json -v $(pwd)/client/docs/swagger-ui:/app swaggerapi/swagger-ui