2022-11-06 11:03:37 +00:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-07-06 03:09:12 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
2022-11-06 11:03:37 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-07-06 03:09:12 +00:00
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-11-06 11:03:37 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 09:10:09 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 08:47:19 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-06 11:03:37 +00:00
|
|
|
with:
|
2023-07-06 03:09:12 +00:00
|
|
|
go-version: "stable"
|
2022-11-06 11:12:13 +00:00
|
|
|
- run: go test -race -failfast ./...
|
2022-11-06 11:03:37 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
2023-09-05 09:10:09 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-07 08:47:19 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-06 11:03:37 +00:00
|
|
|
with:
|
2023-07-06 03:09:12 +00:00
|
|
|
go-version: "stable"
|
2022-11-06 11:13:55 +00:00
|
|
|
- run: go build ./cmd/populatedb
|
2022-11-06 11:03:37 +00:00
|
|
|
golangci-lint:
|
|
|
|
name: golangci-lint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 09:10:09 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-06 11:03:37 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-12-07 08:47:19 +00:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-06 11:03:37 +00:00
|
|
|
with:
|
2023-07-06 03:09:12 +00:00
|
|
|
go-version: "stable"
|
2024-05-07 15:07:48 +00:00
|
|
|
- uses: golangci/golangci-lint-action@v6
|
2022-11-06 11:03:37 +00:00
|
|
|
with:
|
|
|
|
version: latest
|