From ec8f741e58f4031d12d599010ffe97ff3a8874a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Wed, 26 Apr 2023 20:12:58 +0300 Subject: [PATCH] coverage reports --- .github/workflows/integration.yml | 11 ++++++++++- .github/workflows/test-code.yml | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 90edd89bf..e334cb9d0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,5 +1,9 @@ +name: Integration tests + on: push: + tags-ignore: + - "*" jobs: integration-tests: @@ -35,4 +39,9 @@ jobs: go run main.go init --config internal/integration/config/zitadel.yaml --config internal/integration/config/${INTEGRATION_DB_FLAVOR}.yaml go run main.go setup --masterkey MasterkeyNeedsToHave32Characters --config internal/integration/config/zitadel.yaml --config internal/integration/config/${INTEGRATION_DB_FLAVOR}.yaml - name: Run integration tests - run: go test -tags=integration -parallel 1 -v ./internal/integration ./internal/api/grpc/... + run: go test -tags=integration -parallel 1 -v -coverprofile=profile.cov -coverpkg=./pkg/... ./internal/integration ./internal/api/grpc/... + - name: Publish go coverage + uses: codecov/codecov-action@v3.1.0 + with: + file: profile.cov + name: integration-tests diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 7a4793dbe..b681d3b2d 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -44,7 +44,7 @@ jobs: uses: codecov/codecov-action@v3.1.0 with: file: .artifacts/codecov/profile.cov - name: go-codecov + name: unit-tests # As goreleaser doesn't build a dockerfile in snapshot mode, we have to build it here - name: Build Docker Image run: docker build -t zitadel:pr --file build/Dockerfile .artifacts/zitadel