Files
shared-actions/.github/actions/go-test/action.yml
T
tozuo-home-cluster-eso[bot]GitHubtozuo-home-cluster-eso[bot] <287217661+tozuo-home-cluster-eso[bot]@users.noreply.github.com>
5cb1998345 chore(deps): update actions/setup-go action to v7 (#5)
Co-authored-by: tozuo-home-cluster-eso[bot] <287217661+tozuo-home-cluster-eso[bot]@users.noreply.github.com>
2026-10-03 23:00:59 +01:00

38 lines
843 B
YAML

name: "Go Test"
description: "Run Go tests with race detection"
inputs:
go-version:
description: "Go version to use"
required: false
default: ">=1.24"
working-directory:
description: "Working directory"
required: false
default: "."
build-tags:
description: "Build tags to pass to go test (e.g., 'fts5')"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: ${{ inputs.go-version }}
- name: Run tests
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
CGO_ENABLED: 1
run: |
TAGS="${{ inputs.build-tags }}"
if [ -n "$TAGS" ]; then
go test -tags "$TAGS" -race -v ./...
else
go test -race -v ./...
fi