Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix codecov #2538

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: make test-unit

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ zarf-sbom/
test-*.txt
__debug_bin
.netlify
coverage.out
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading