3d3c74fdb2
CI / check-and-test (pull_request) Failing after 1m1s
Direct pushes to main currently skip tests because the workflow only listened for pull_request. Scratchbox already tests every push; do the same here.
28 lines
737 B
YAML
28 lines
737 B
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- uses: actions/setup-go@main
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
- run: go mod tidy
|
|
- run: go build ./...
|
|
- run: go vet ./...
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v4
|
|
with:
|
|
version: latest
|
|
args: --timeout=5m
|
|
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
- run: govulncheck ./...
|
|
- run: go test -race -v -shuffle=on -coverprofile=coverage.out -timeout=5m ./...
|
|
- run: go tool cover -func=coverage.out | tail -10 # basic coverage report
|