Skip to content

Commit

Permalink
Update tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shijl0925 authored Sep 6, 2024
1 parent 225cfc6 commit 1187c94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.21
check-latest: true
cache: true

- name: Verify go.mod is tidy
run: |
go mod tidy -go=1.21
git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand All @@ -42,6 +45,6 @@ jobs:
check-latest: true
cache: true
- name: Run all tests
run: go test -v ./... | tee test.log; exit ${PIPESTATUS[0]}
run: go test -v $(go list ./... | grep -v /sonarqube/) | tee test.log; exit ${PIPESTATUS[0]}
- name: Pretty print tests running time
run: grep --color=never -e '--- PASS:' -e '--- FAIL:' test.log | sed 's/[:()]//g' | awk '{print $2,$3,$4}' | sort -t' ' -nk3 -r | awk '{sum += $3; print $1,$2,$3,sum"s"}'

0 comments on commit 1187c94

Please sign in to comment.