Skip to content

Commit

Permalink
Add coverpkg to test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Aug 18, 2021
1 parent db2543a commit e0168d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ jobs:
tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf -
- name: Upload coverage report
uses: codecov/codecov-action@v2.0.2
if: hashFiles('coverage.txt') != ''
if: hashFiles('coverage.out') != ''
with:
file: ./coverage.txt
file: ./coverage.out
fail_ci_if_error: true
verbose: true
- name: Store coverage test output
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ test-gocql:
docker run --name cass-integ --rm -p 9042:9042 -d cassandra:3; \
CMD=cassandra IMG_NAME=cass-integ ./tools/wait.sh; \
(cd instrumentation/github.com/gocql/gocql/otelgocql/test/ && \
$(GOTEST_WITH_COVERAGE) . && \
$(GOTEST_WITH_COVERAGE) -coverpkg=go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql/... ./... && \
go tool cover -html=coverage.out -o coverage.html); \
cp ./instrumentation/github.com/gocql/gocql/otelgocql/test/coverage.out ./; \
docker stop cass-integ; \
Expand All @@ -78,7 +78,7 @@ test-mongo-driver:
docker run --name mongo-integ --rm -p 27017:27017 -d mongo; \
CMD=mongo IMG_NAME=mongo-integ ./tools/wait.sh; \
(cd instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test && \
$(GOTEST_WITH_COVERAGE) . && \
$(GOTEST_WITH_COVERAGE) -coverpkg=go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/... ./... && \
go tool cover -html=coverage.out -o coverage.html); \
cp ./instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/coverage.out ./; \
docker stop mongo-integ; \
Expand All @@ -90,8 +90,8 @@ test-gomemcache:
set -e; \
docker run --name gomemcache-integ --rm -p 11211:11211 -d memcached; \
CMD=gomemcache IMG_NAME=gomemcache-integ ./tools/wait.sh; \
(cd instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache && \
$(GOTEST_WITH_COVERAGE) . && \
(cd instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test && \
$(GOTEST_WITH_COVERAGE) -coverpkg=go.opentelemetry.io/contrib/instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/... ./... && \
go tool cover -html=coverage.out -o coverage.html); \
docker stop gomemcache-integ ; \
cp ./instrumentation/github.com/bradfitz/gomemcache/memcache/otelmemcache/test/coverage.out ./; \
Expand Down

0 comments on commit e0168d4

Please sign in to comment.