Skip to content

Update workflows

Update workflows #6

Workflow file for this run

name: Static Analysis
on: [push, pull_request]
permissions:
contents: read
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install analysis tools
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install lucor.dev/lian@latest
- name: Vet
run: go vet ./...
- name: Goimports
run: test -z "$(goimports -e -d . | tee /dev/stderr)"
- name: Gocyclo
run: gocyclo -over 25 .
- name: Staticcheck
run: staticcheck ./...
- name: Check license of dependencies
run: lian -d --allowed="Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, ISC" --excluded=github.com/jsummers/[email protected]