name: go-test run-name: "Go unit tests" on: push: pull_request: workflow_dispatch: jobs: test: name: go test runs-on: Linux-Runner timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '1.26' - name: go vet run: go vet ./... - name: go test run: go test -race -coverprofile=coverage.out ./... - name: Coverage summary run: go tool cover -func=coverage.out | tail -20 - name: Upload coverage if: ${{ always() }} uses: https://github.com/christopherHX/gitea-upload-artifact@v4 with: name: coverage path: coverage.out retention-days: 7