From 38777801de4135b65aed9fe7292fe87acb96ec5b Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 21 Dec 2020 17:04:31 +0200 Subject: [PATCH] Upload coverage to Codecov Signed-off-by: Stefan Prodan --- .github/workflows/build.yaml | 8 +++++++- .github/workflows/release.yml | 1 + .gitignore | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c124734b..8eed6035 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5b8f443..b7c9b459 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/.gitignore b/.gitignore index 92c6a2e3..901c9a04 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ artifacts/gcloud/ Makefile.dev vendor +coverage.txt