2020-11-11 15:41:18 +00:00
|
|
|
name: Go
|
|
|
|
|
2021-04-16 07:22:14 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2020-11-11 15:41:18 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-04-13 08:26:32 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-11-11 15:41:18 +00:00
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-04-13 08:26:32 +00:00
|
|
|
go-version: "~1.18"
|
|
|
|
- run: go test -race -coverprofile=coverage.out ./...
|
2021-04-16 07:22:14 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2020-12-01 10:55:52 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-04-13 08:26:32 +00:00
|
|
|
go-version: "~1.18"
|
2021-04-16 07:22:14 +00:00
|
|
|
- run: go build
|
2022-04-13 08:26:32 +00:00
|
|
|
golangci-lint:
|
|
|
|
name: golangci-lint
|
2020-11-11 15:41:18 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
2021-04-16 07:22:14 +00:00
|
|
|
version: latest
|
2022-04-13 08:26:32 +00:00
|
|
|
semgrep:
|
|
|
|
name: semgrep
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: returntocorp/semgrep-action@v1
|
|
|
|
with:
|
|
|
|
config: >-
|
|
|
|
p/security-audit
|
|
|
|
p/secrets
|
|
|
|
p/golang
|