mirror of https://github.com/perkeep/perkeep.git
42 lines
986 B
YAML
42 lines
986 B
YAML
on: [push, pull_request]
|
|
name: "tests/lint"
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.16.x]
|
|
platform: [ubuntu-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-go-
|
|
|
|
- name: Symlink source into GOPATH for devcam
|
|
run: |
|
|
mkdir $(go env GOPATH)/src
|
|
ln -s $(pwd) $(go env GOPATH)/src/perkeep.org
|
|
|
|
- name: Check for fmt compliance
|
|
run: |
|
|
go fmt ./...
|
|
test -z "$(git status --porcelain)"
|
|
|
|
- name: Go vet
|
|
run: go vet ./...
|
|
|
|
- name: Run staticcheck
|
|
run: go run honnef.co/go/tools/cmd/staticcheck ./...
|
|
|
|
- name: Check for env vars documentation
|
|
run: go run dev/envvardoc/envvardoc.go
|