mirror of
https://github.com/lukaszraczylo/shared-actions.git
synced 2026-06-09 23:03:54 +00:00
Utilise composite workflows.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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: "."
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ inputs.go-version }}
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
run: go test -race -v ./...
|
||||
Reference in New Issue
Block a user