From 8515fc0cb5d0bf61eda1ae427c0cd8979ea15f0e Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Tue, 30 Jan 2024 00:57:41 +0700 Subject: [PATCH] update workflows --- .github/workflows/test.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0bf94dd..390ef22 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,11 +18,11 @@ jobs: pull-requests: write steps: - name: Checkout - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "1.20" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/go/pkg/mod @@ -41,14 +41,14 @@ jobs: - name: Run Go unit tests run: go test -v -race -timeout 3m -coverprofile=coverage.out ./... - name: Go coverage format - if: ${{ github.event_name == 'pull_request_target' }} + if: ${{ github.event_name == 'pull_request' }} run: | go get github.com/boumenot/gocover-cobertura go install github.com/boumenot/gocover-cobertura gocover-cobertura < coverage.out > coverage.xml - name: Code Coverage Summary Report uses: irongut/CodeCoverageSummary@v1.3.0 - if: ${{ github.event_name == 'pull_request_target' }} + if: ${{ github.event_name == 'pull_request' }} with: filename: coverage.xml badge: true @@ -61,7 +61,7 @@ jobs: thresholds: "60 80" - name: Add Coverage PR Comment uses: marocchino/sticky-pull-request-comment@v2 - if: ${{ github.event_name == 'pull_request_target' }} + if: ${{ github.event_name == 'pull_request' }} with: path: code-coverage-results.md - name: Dump docker logs on failure