Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
env:
GOFLAGS: -mod=vendor
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- name: Check formatting
run: |
unformatted=$(gofmt -l $(find . -name '*.go' -not -path './vendor/*'))
if [ -n "$unformatted" ]; then
echo "The following files are not gofmt'd:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Install staticcheck
env:
GOFLAGS: ""
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Staticcheck
run: staticcheck ./...
- name: Test
run: go test -race -cover -short ./...
- name: Build
run: go build ./...