Add GitHub Action to test Go code with specified version
This commit is contained in:
commit
d04a71632c
1 changed files with 22 additions and 0 deletions
22
test/action.yml
Normal file
22
test/action.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: "Go test"
|
||||||
|
description: "Tests go code"
|
||||||
|
inputs:
|
||||||
|
GO_VERSION:
|
||||||
|
description: "Go version to use"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: "Install go"
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ inputs.GO_VERSION }}
|
||||||
|
- name: "Print go version"
|
||||||
|
run: go version
|
||||||
|
- name: Test everything
|
||||||
|
run: go test ./...
|
Loading…
Add table
Add a link
Reference in a new issue