-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Collect code coverage from integration tests and upload to codecov #4964
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
Changes from all commits
fff9889
fa3446a
5b55e64
d3e8181
79b565a
ef779cd
9a362b8
a397991
8c2359d
363dac0
8675b96
d695c2a
a92deba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Codecov upload often fails on rate limits if used without a token. | ||
| # See https://github.com/codecov/codecov-action/issues/837 | ||
| # This action exposes the token as env.CODECOV_TOKEN. | ||
| # We cannot define it as "secret" as we need it accessible from forks. | ||
| name: 'Setup CODECOV_TOKEN' | ||
| description: 'Make CODECOV_TOKEN var accessible to job' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Setup CODECOV_TOKEN | ||
| shell: bash | ||
| run: | | ||
| echo "CODECOV_TOKEN=f457b710-93af-4191-8678-bcf51281f98c" >> ${GITHUB_ENV} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ else | |
| endif | ||
|
|
||
|
|
||
| # all .go files that are not auto-generated and should be auto-formatted and linted. | ||
| # All .go files that are not auto-generated and should be auto-formatted and linted. | ||
| ALL_SRC = $(shell find . -name '*.go' \ | ||
| -not -name 'doc.go' \ | ||
| -not -name '_*' \ | ||
|
|
@@ -61,6 +61,7 @@ GOFMT=gofmt | |
| GOFUMPT=gofumpt | ||
| FMT_LOG=.fmt.log | ||
| IMPORT_LOG=.import.log | ||
| COLORIZE ?= | $(SED) 's/PASS/✅ PASS/g' | $(SED) 's/FAIL/❌ FAIL/g' | $(SED) 's/SKIP/☠️ SKIP/g' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed COLORIZE macro to include |
||
|
|
||
| GIT_SHA=$(shell git rev-parse HEAD) | ||
| GIT_CLOSEST_TAG=$(shell git describe --abbrev=0 --tags) | ||
|
|
@@ -88,9 +89,6 @@ SWAGGER_GEN_DIR=swagger-gen | |
|
|
||
| JAEGER_DOCKER_PROTOBUF=jaegertracing/protobuf:0.4.0 | ||
|
|
||
| COLOR_PASS=$(shell printf "\033[32mPASS\033[0m") | ||
| COLOR_FAIL=$(shell printf "\033[31mFAIL\033[0m") | ||
| COLORIZE ?=$(SED) ''/PASS/s//$(COLOR_PASS)/'' | $(SED) ''/FAIL/s//$(COLOR_FAIL)/'' | ||
| DOCKER_NAMESPACE?=jaegertracing | ||
| DOCKER_TAG?=latest | ||
|
|
||
|
|
@@ -103,22 +101,28 @@ SYSOFILE=resource.syso | |
| .PHONY: test-and-lint | ||
| test-and-lint: test fmt lint | ||
|
|
||
| echo-all-pkgs: | ||
| @echo $(ALL_PKGS) | tr ' ' '\n' | sort | ||
|
|
||
| echo-all-srcs: | ||
| @echo $(ALL_SRC) | tr ' ' '\n' | sort | ||
|
|
||
| # TODO: no files actually use this right now | ||
| .PHONY: go-gen | ||
| go-gen: | ||
| @echo skipping go generate ./... | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -rf cover.out .cover/ cover.html $(FMT_LOG) $(IMPORT_LOG) \ | ||
| rm -rf cover*.out .cover/ cover.html $(FMT_LOG) $(IMPORT_LOG) \ | ||
| jaeger-ui/packages/jaeger-ui/build | ||
| find ./cmd/query/app/ui/actual -type f -name '*.gz' -delete | ||
| GOCACHE=$(GOCACHE) go clean -cache -testcache | ||
| find cmd -type f -executable | xargs -I{} sh -c '(git ls-files --error-unmatch {} 2>/dev/null || rm -v {})' | ||
|
|
||
| .PHONY: test | ||
| test: go-gen | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=memory_storage_integration ./... | $(COLORIZE)" | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=memory_storage_integration ./... $(COLORIZE)" | ||
|
|
||
| .PHONY: all-in-one-integration-test | ||
| all-in-one-integration-test: go-gen | ||
|
|
@@ -129,47 +133,34 @@ storage-integration-test: go-gen | |
| # Expire tests results for storage integration tests since the environment might change | ||
| # even though the code remains the same. | ||
| go clean -testcache | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) $(STORAGE_PKGS) | $(COLORIZE)" | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -coverpkg=./... -coverprofile cover.out $(STORAGE_PKGS) $(COLORIZE)" | ||
|
|
||
| .PHONY: badger-storage-integration-test | ||
| badger-storage-integration-test: | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=badger_storage_integration -coverpkg=./... -coverprofile cover-badger.out $(STORAGE_PKGS) $(COLORIZE)" | ||
|
|
||
| .PHONY: grpc-storage-integration-test | ||
| grpc-storage-integration-test: | ||
| (cd examples/memstore-plugin/ && go build .) | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_storage_integration $(STORAGE_PKGS) | $(COLORIZE)" | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags=grpc_storage_integration -coverpkg=./... -coverprofile cover.out $(STORAGE_PKGS) $(COLORIZE)" | ||
|
|
||
| .PHONY: index-cleaner-integration-test | ||
| index-cleaner-integration-test: docker-images-elastic | ||
| # Expire test results for storage integration tests since the environment might change | ||
| # even though the code remains the same. | ||
| go clean -testcache | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags index_cleaner $(STORAGE_PKGS) | $(COLORIZE)" | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags index_cleaner -coverpkg=./... -coverprofile cover-index-cleaner.out $(STORAGE_PKGS) $(COLORIZE)" | ||
|
|
||
| .PHONY: index-rollover-integration-test | ||
| index-rollover-integration-test: docker-images-elastic | ||
| # Expire test results for storage integration tests since the environment might change | ||
| # even though the code remains the same. | ||
| go clean -testcache | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags index_rollover $(STORAGE_PKGS) | $(COLORIZE)" | ||
|
|
||
| .PHONY: token-propagation-integration-test | ||
| token-propagation-integration-test: | ||
| go clean -testcache | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags token_propagation -run TestBearTokenPropagation $(STORAGE_PKGS) | $(COLORIZE)" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was not used anywhere |
||
|
|
||
| echo-all-pkgs: | ||
| @echo $(ALL_PKGS) | tr ' ' '\n' | sort | ||
|
|
||
| echo-all-srcs: | ||
| @echo $(ALL_SRC) | tr ' ' '\n' | sort | ||
| bash -c "set -e; set -o pipefail; $(GOTEST) -tags index_rollover -coverpkg=./... -coverprofile cover-index-rollover.out $(STORAGE_PKGS) $(COLORIZE)" | ||
|
|
||
| .PHONY: cover | ||
| cover: nocover | ||
| $(GOTEST) -tags=memory_storage_integration -timeout 5m -coverprofile cover.out ./... | ||
| grep -E -v 'model.pb.*.go' cover.out > cover-nogen.out | ||
| mv cover-nogen.out cover.out | ||
| go tool cover -html=cover.out -o cover.html | ||
|
|
||
| .PHONY: nocover | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package builder |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package config |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package gocql |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package eswrapper |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package auth |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package consumer |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) 2023 The Jaeger Authors. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package producer |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why specifically 11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's how many reports we upload