populatedb-go/.github/workflows/go.yaml

52 lines
1.1 KiB
YAML

name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.19"
check-latest: true
cache: true
- run: go test -race -failfast ./...
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.19"
check-latest: true
cache: true
- run: go build ./cmd/populatedb
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: "1.19"
check-latest: true
cache: true
- uses: golangci/golangci-lint-action@v3
with:
version: latest