Skip to content

Commit

Permalink
try new test format
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Nov 30, 2024
1 parent bd8e939 commit 2a65be3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install go go-ctrf-json-reporter
run: go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest
- name: Run tests
run: |
set -euo pipefail
go test -json -race -failfast -tags="headless" -coverprofile=profile.cov -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -nofail
go test -json -race -failfast -tags="headless" -coverprofile=profile.cov ./... | go-ctrf-json-reporter -output ctrf-report.json
- name: Run CTRF annotations
run: npx github-actions-ctrf ctrf-report.json
if: always()
# Upload the original go test log as an artifact for later review.
- name: Upload test log
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 2a65be3

Please sign in to comment.