8000 feat: merge coverage file and report to goverall by cutecutecat · Pull Request #1211 · tensorchord/envd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: merge coverage file and report to goverall #1211

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

Merged
merged 1 commit into from
Nov 21, 2022
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
24 changes: 14 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,25 +202,29 @@ jobs:
- name: Install bins
run: |
go install github.com/mattn/goveralls@latest
go install github.com/wadey/gocovmerge@latest
- name: Get coverage report
uses: actions/download-artifact@v3
with:
name: coverage-out
path: coverage.out
path: merge

- name: Get cli e2e coverage report
uses: actions/download-artifact@v3
with:
name: e2e-cli-coverage-out
path: e2e-cli-coverage.out
path: merge
- name: Get language e2e coverage report
uses: actions/download-artifact@v3
with:
name: e2e-lang-coverage-out
path: e2e-lang-coverage.out
# - name: Send coverage
# env:
# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gocovmerge e2e-coverage.out coverage.out > final.out
# goveralls -coverprofile=final.out -service=github
path: merge
- name: Merge all coverage reports
uses: cutecutecat/go-cover-merge@v1
with:
input_dir: merge
output_file: final.out
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls -coverprofile=final.out -service=github
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ e2e-test:
-X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \
-X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \
-X $(ROOT)/pkg/version.developmentFlag=true" \
-race -v -timeout 20m -coverpkg=./pkg/app -coverprofile=e2e-coverage.out ./e2e
-race -v -timeout 20m -coverpkg=./pkg/... -coverprofile=e2e-coverage.out ./e2e


e2e-cli-test:
Expand All @@ -193,7 +193,7 @@ e2e-cli-test:
-X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \
-X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \
-X $(ROOT)/pkg/version.developmentFlag=true" \
-race -v -timeout 20m -coverpkg=./pkg/app -coverprofile=e2e-cli-coverage.out ./e2e/cli
-race -v -timeout 20m -coverpkg=./pkg/... -coverprofile=e2e-cli-coverage.out ./e2e/cli

e2e-lang-test:
@go test -ldflags "-s -w -X $(ROOT)/pkg/version.version=$(VERSION) \
Expand All @@ -202,7 +202,7 @@ e2e-lang-test:
-X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \
-X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \
-X $(ROOT)/pkg/version.developmentFlag=true" \
-race -v -timeout 20m -coverpkg=./pkg/app -coverprofile=e2e-lang-coverage.out ./e2e/language
-race -v -timeout 20m -coverpkg=./pkg/... -coverprofile=e2e-lang-coverage.out ./e2e/language

e2e-doc-test:
@go test -ldflags "-s -w -X $(ROOT)/pkg/version.version=$(VERSION) \
Expand All @@ -211,7 +211,7 @@ e2e-doc-test:
-X $(ROOT)/pkg/version.gitTreeState=$(GIT_TREE_STATE) \
-X $(ROOT)/pkg/version.gitTag="$(shell git describe --tags --abbrev=0)" \
-X $(ROOT)/pkg/version.developmentFlag=true" \
-race -v -timeout 60m -coverpkg=./pkg/app -coverprofile=e2e-doc-coverage.out ./e2e/docs
-race -v -timeout 60m -coverpkg=./pkg/... -coverprofile=e2e-doc-coverage.out ./e2e/docs


clean: ## Clean the outputs and artifacts
Expand Down
0