Add codecov.sh script #58

This commit is contained in:
Michael Mayer 2018-11-06 17:49:03 +01:00
parent 9e8ed74587
commit af828ef8db
3 changed files with 16 additions and 1 deletions

View file

@ -42,7 +42,7 @@ test-race:
$(GOTEST) -race -timeout 60m -v ./internal/... $(GOTEST) -race -timeout 60m -v ./internal/...
test-codecov: test-codecov:
$(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/... $(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/...
bash <(curl -s https://codecov.io/bash) scripts/codecov.sh
test-coverage: test-coverage:
$(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/... $(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/...
$(GOTOOL) cover -html=coverage.txt -o coverage.html $(GOTOOL) cover -html=coverage.txt -o coverage.html

View file

@ -7,6 +7,18 @@ services:
command: tail -f /dev/null command: tail -f /dev/null
environment: environment:
- CODECOV_TOKEN - CODECOV_TOKEN
- CODECOV_ENV
- CODECOV_TOKEN
- CODECOV_URL
- CODECOV_SLUG
- VCS_COMMIT_ID
- VCS_BRANCH_NAME
- VCS_PULL_REQUEST
- VCS_SLUG
- VCS_TAG
- CI_BUILD_URL
- CI_BUILD_ID
- CI_JOB_ID
database: database:
image: mysql:latest image: mysql:latest

3
scripts/codecov.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
bash <(curl -s https://codecov.io/bash)