52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Go
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- develop
|
|
paths:
|
|
- 'cmd/**' # Ignore changes to the Lua code
|
|
- 'go.sum'
|
|
- 'go.mod'
|
|
|
|
concurrency:
|
|
group: pr-${{ github.workflow }}-${{ github.head_ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
go_lint:
|
|
name: Lint Go 💅
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.25.1'
|
|
cache: false
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v7
|
|
with:
|
|
version: v2.7.2
|
|
only-new-issues: true
|
|
skip-cache: true
|
|
- name: Install staticcheck
|
|
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
|
|
|
|
- name: Run staticcheck
|
|
run: staticcheck ./...
|
|
go_test:
|
|
name: Test Go 🧪
|
|
needs: [go_lint]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.25.1'
|
|
- name: Build
|
|
run: make compile
|
|
- name: Test
|
|
run: make test
|
|
|