feat: add Golang tests to GitHub test workflow

This commit is contained in:
Trevor Brown 2024-01-27 15:35:27 -05:00
parent d8afc037c7
commit 3c876d25cd
2 changed files with 17 additions and 0 deletions

View File

@ -39,6 +39,8 @@ jobs:
run: go install honnef.co/go/tools/cmd/staticcheck@latest run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Lint - name: Lint
run: staticcheck -tests -show-ignored ./... run: staticcheck -tests -show-ignored ./...
- name: Build
run: build -v ./...
actions: actions:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -35,6 +35,21 @@ jobs:
- 'defaults' - 'defaults'
- 'help.txt' - 'help.txt'
test-golang:
needs: detect-changes
if: ${{ needs.detect-changes.outputs.cli == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.5'
- name: Install dependencies
run: go get .
- name: Run Go tests
run: go test
ubuntu: ubuntu:
needs: detect-changes needs: detect-changes
# only run if # only run if