Upload coverage to Codecov

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2020-12-21 17:04:31 +02:00
parent fda53fbf80
commit 38777801de
3 changed files with 9 additions and 1 deletions

View File

@@ -28,8 +28,10 @@ jobs:
run: |
go mod download
go install golang.org/x/tools/cmd/goimports
- name: Run linters
run: make test-fmt test-codegen
- name: Run tests
run: make test
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
@@ -37,5 +39,9 @@ jobs:
echo 'run make test and commit changes'
exit 1
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
- name: Build container image
run: docker build -t test/flagger:latest .

View File

@@ -58,6 +58,7 @@ jobs:
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_url: https://flagger.app
- name: Create release
uses: actions/create-release@latest
env:

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ artifacts/gcloud/
Makefile.dev
vendor
coverage.txt