Skip to content

Commit

Permalink
chore(ci): Upload test coverage from snapshot builds (#1764)
Browse files Browse the repository at this point in the history
Also removes the E2E upload because we need to build a special binary to
capture E2E coverage (#1763).

Signed-off-by: Charith Ellawala <charith@cerbos.dev>
  • Loading branch information
charithe committed Aug 22, 2023
1 parent 2bae859 commit b3c81ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ jobs:
E2E_SKIP_CLUSTER: "true"
E2E_NO_CLEANUP: "true"

- name: Upload coverage to Coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: e2e.cover
flag-name: e2e

- name: Notify Slack
if: failure()
env:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ jobs:
- name: Test
run: make test-all

- name: Upload to CodeCov
uses: codecov/codecov-action@v3
- name: Upload unit coverage to Coveralls
uses: shogo82148/actions-goveralls@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: "unit.cover,integration.cover"
path-to-profile: unit.cover
flag-name: unit-main

- name: Upload integration coverage to Coveralls
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: integration.cover
flag-name: integration-main

- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
Expand Down
2 changes: 1 addition & 1 deletion e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ run_tests() {
(
cd "$SCRIPT_DIR"
telepresence helm upgrade
telepresence connect --no-report -- go test -v -failfast -p=1 -cover -coverprofile=../e2e.cover --tags="tests e2e" "$@"
telepresence connect --no-report -- go test -v -failfast -p=1 --tags="tests e2e" "$@"
)
}

Expand Down

0 comments on commit b3c81ff

Please sign in to comment.