Skip to content

Commit

Permalink
chore: fix codecov (#2538)
Browse files Browse the repository at this point in the history
Signed-off-by: schristoff <28318173+schristoff@users.noreply.github.com>
Co-authored-by: razzle <razzle@defenseunicorns.com>
Co-authored-by: schristoff <167717759+schristoff-du@users.noreply.github.com>
Co-authored-by: Lucas Rodriguez <lucas.rodriguez@defenseunicorns.com>
  • Loading branch information
4 people committed May 23, 2024
1 parent 42e1bf9 commit 6c9d5da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
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

0 comments on commit 6c9d5da

Please sign in to comment.