ci: add annotate test result

This commit is contained in:
Planxnx
2024-04-25 15:00:33 +07:00
parent 17d86be552
commit 84e3724e34
2 changed files with 14 additions and 10 deletions

View File

@@ -42,8 +42,8 @@ jobs:
test:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
go-version: ["1.22.x", "1.x"] # minimum version and latest version
os: ["ubuntu-latest"]
go-version: ["1.22.x"] # minimum version and latest version
name: Test (${{ matrix.os }}/${{ matrix.go-version }})
runs-on: ${{ matrix.os }}
steps:
@@ -59,12 +59,16 @@ jobs:
- run: echo "GOVERSION=$(go version)" >> $GITHUB_ENV
- name: Test
uses: robherley/go-test-action@v0
# with:
# testArguments: ./... >> test_output.json
run: go test -json ./... > test_output.json
# - name: Annotate Test Results
# if: always()
# uses: guyarb/golang-test-annotations@v0.5.1
# with:
# test-results: test_output.json"
- name: Summary Test Results
if: always()
uses: robherley/go-test-action@v0
with:
fromJSONFile: test_output.json
- name: Annotate Test Results
if: always()
uses: guyarb/golang-test-annotations@v0.5.1
with:
test-results: test_output.json

0
test_output.json Normal file
View File