Skip to content

Commit

Permalink
Add coverage reports to all PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronH88 committed Jul 3, 2023
1 parent 8d5dcca commit 7285b16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ jobs:
- name: Interact with the cluster
run: kubectl get nodes

- name: Run receptor tests
run: make test
- name: Run receptor tests with coverage
run: make coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: get k8s logs
if: ${{ failure() }}
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ testloop: receptor
make test; do \
i=$$((i+1)); done

coverage:
PATH="${PWD}:${PATH}" \
go test ./... $(TESTCMD) -count=1 -race -timeout 5m -coverprofile=coverage.txt -covermode=atomic

kubectl:
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
chmod a+x kubectl
Expand Down

0 comments on commit 7285b16

Please sign in to comment.