diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index f3425c1098..90429169f1 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -25,17 +25,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Run coverage - run: go test -race -coverprofile=coverage.out -covermode=atomic - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: Setup golang uses: ./.github/actions/golang - name: Run unit tests - run: make test-unit \ No newline at end of file + run: make test-unit + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 493e7381c2..2a68c38107 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ zarf-sbom/ test-*.txt __debug_bin .netlify +coverage.out diff --git a/Makefile b/Makefile index 5683962afc..1924780d4c 100644 --- a/Makefile +++ b/Makefile @@ -208,9 +208,7 @@ test-upgrade: ## Run the Zarf CLI E2E tests for an external registry and cluster .PHONY: test-unit test-unit: ## Run unit tests - cd src/pkg && go test ./... -failfast -v -timeout 30m - cd src/internal && go test ./... -failfast -v timeout 30m - cd src/extensions/bigbang && go test ./. -failfast -v timeout 30m + go test -failfast -v -coverprofile=coverage.out -covermode=atomic $$(go list ./... | grep -v '^github.com/defenseunicorns/zarf/src/test' | grep -v 'github.com/defenseunicorns/zarf/src/extensions/bigbang/test') # INTERNAL: used to test that a dev has ran `make docs-and-schema` in their PR test-docs-and-schema: