Skip to content

Commit

Permalink
change folder names
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Aller <[email protected]>
  • Loading branch information
zachaller committed Jul 23, 2024
1 parent d06df9b commit 85ff2ef
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ jobs:
- name: Generate code coverage artifacts
uses: actions/upload-artifact@v4
with:
name: e2e-coverage-output
path: e2e-coverage-output
name: coverage-output-e2e
path: coverage-output-e2e
coverage-process:
name: Run end-to-end tests
runs-on: ubuntu-latest
Expand All @@ -163,10 +163,20 @@ jobs:
- name: Get e2e code coverage
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: e2e-coverage-output
path: e2e-coverage-output
name: coverage-output-e2e
path: coverage-output-e2e
- name: Get unit test code coverage
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: code-coverage
path: coverage.out
name: coverage-output-unit
path: coverage-output-unit
- name: combine-go-coverage
run: |
go tool covdata percent -i=coverage-output-unit/,coverage-output-e2e/ -o full-coverage.out
- name: Upload code coverage information to codecov.io
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: full-coverage.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ plugin-bin/
# static
server/static/*
!server/static/.gitkeep
e2e-coverage-output/
coverage-output-e2e/
coverage-output-unit/
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,17 @@ test-kustomize: ## run kustomize tests

.PHONY: start-e2e
start-e2e: ## start e2e test environment
mkdir -p e2e-coverage-output
GOCOVERDIR=e2e-coverage-output go run -cover ./cmd/rollouts-controller/main.go --instance-id ${E2E_INSTANCE_ID} --loglevel debug --kloglevel 6
mkdir -p coverage-output-e2e
GOCOVERDIR=coverage-output-e2e go run -cover ./cmd/rollouts-controller/main.go --instance-id ${E2E_INSTANCE_ID} --loglevel debug --kloglevel 6

.PHONY: test-e2e
test-e2e: install-devtools-local
${DIST_DIR}/gotestsum --rerun-fails-report=rerunreport.txt --junitfile=junit.xml --format=testname --packages="./test/e2e" --rerun-fails=5 -- -timeout 60m -count 1 --tags e2e -p ${E2E_PARALLEL} -parallel ${E2E_PARALLEL} -v --short ./test/e2e ${E2E_TEST_OPTIONS}

.PHONY: test-unit
test-unit: install-devtools-local ## run unit tests
${DIST_DIR}/gotestsum --junitfile=junit.xml --format=testname -- -covermode=count -coverprofile=coverage.out `go list ./... | grep -v ./test/cmd/metrics-plugin-sample`
mkdir -p coverage-output-unit
${DIST_DIR}/gotestsum --junitfile=junit.xml --format=testname -- -covermode=count -coverprofile=coverage-output-unit/coverage.out `go list ./... | grep -v ./test/cmd/metrics-plugin-sample`


.PHONY: coverage
Expand Down

0 comments on commit 85ff2ef

Please sign in to comment.