mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-06-08 22:59:26 +00:00
e4dac8969a
- actions/checkout v4 -> v6 - actions/setup-go v5 -> v6 - actions/setup-node v4 -> v6 - actions/upload-artifact v4 -> v7 - actions/download-artifact v4 -> v8 - actions/github-script v7 -> v9 - goreleaser/goreleaser-action v6 -> v7 - docker/login-action v3 -> v4 - docker/setup-buildx-action v3 -> v4 - docker/setup-qemu-action v3 -> v4 - sigstore/cosign-installer v3 -> v4 - peter-evans/create-pull-request v7 -> v8
38 lines
843 B
YAML
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@v6
|
|
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
|