Skip to content

add github action for go test #1

add github action for go test

add github action for go test #1

Workflow file for this run

name: Go Test Report
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.24
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Run tests and generate report
run: |
mkdir -p test-report
$(go env GOPATH)/bin/gotestsum --junitfile test-report/report.xml --format standard-verbose ./...
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: go-test-report
path: test-report/report.xml
- name: Publish Test Results to GitHub UI
uses: mikepenz/action-junit-report@v4
with:
report_paths: 'test-report/*.xml'