This commit is contained in:
@@ -2,18 +2,38 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main", "develop" ]
|
branches: ["main", "develop"]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout
|
||||||
- uses: actions/setup-go@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: "1.22"
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Go env
|
||||||
|
run: |
|
||||||
|
go version
|
||||||
|
go env
|
||||||
|
|
||||||
|
- name: Vet
|
||||||
|
run: go vet ./...
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./... -race -count=1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build ./cmd/...
|
run: go build ./cmd/...
|
||||||
|
|
||||||
|
- name: Quick static checks (optional)
|
||||||
|
run: |
|
||||||
|
# gofmt check (fails if formatting differs)
|
||||||
|
test -z "$(gofmt -l . | head -n 1)"
|
||||||
|
|||||||
Reference in New Issue
Block a user