Skip to content

Commit

Permalink
ci: Show test report in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
timabell committed Jan 27, 2024
1 parent 87d837c commit 6441691
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest
- uses: actions/checkout@v4
- name: Install dependencies
run: go get .
Expand All @@ -36,9 +38,17 @@ jobs:
--live=true \
--listen-on-port=9999 \
--sqlite-file="$file" \
> TestResults-${{ matrix.go-version }}.json
2>&1 | go-junit-report -parser gojson -iocopy -out results-sqlite-flags-${{ matrix.go-version }}.xml
- name: Upload Go test results
uses: actions/upload-artifact@v3
with:
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.json

- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Tests # Name of the check run which will be created
path: results-*.xml # Path to test results
reporter: jest-junit # Format of test results

0 comments on commit 6441691

Please sign in to comment.