2023-12-30 20:16:34 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-01-14 01:11:57 +00:00
|
|
|
- "master"
|
2023-12-30 20:16:34 +00:00
|
|
|
pull_request:
|
|
|
|
# all PRs on all branches
|
2021-07-27 01:19:53 +00:00
|
|
|
name: "tests/lint"
|
2021-01-14 17:16:53 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-12-30 19:02:10 +00:00
|
|
|
go-version: [1.21.x]
|
2021-01-14 17:16:53 +00:00
|
|
|
platform: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
|
|
|
|
steps:
|
2024-01-14 23:16:18 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
2021-01-14 17:16:53 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
2024-01-14 23:16:18 +00:00
|
|
|
- uses: actions/cache@v3
|
2021-01-14 17:16:53 +00:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: ${{ runner.os }}-go-
|
|
|
|
|
|
|
|
- name: Check for fmt compliance
|
|
|
|
run: |
|
|
|
|
go fmt ./...
|
|
|
|
test -z "$(git status --porcelain)"
|
2021-08-10 05:37:58 +00:00
|
|
|
|
2021-09-04 23:57:39 +00:00
|
|
|
- name: Go vet
|
|
|
|
run: go vet ./...
|
|
|
|
|
|
|
|
- name: Run staticcheck
|
2024-01-13 23:31:04 +00:00
|
|
|
run: make staticcheck
|
2021-09-04 23:57:39 +00:00
|
|
|
|
|
|
|
- name: Check for env vars documentation
|
|
|
|
run: go run dev/envvardoc/envvardoc.go
|