Update workflow deps #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static analysis | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.x' | |
- name: Download deps | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get update && sudo apt-get install -y libasound2-dev libxrandr-dev libxcursor-dev libgl-dev libglx-dev | |
fi | |
shell: bash | |
- name: Install analysis tools | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Vet | |
run: go vet ./cmd/... ./lib/... ./ui/... | |
- name: Goimports | |
run: test -z "$(goimports -e -d . | tee /dev/stderr)" | |
- name: Staticcheck | |
run: staticcheck ./cmd/... ./lib/... ./ui/... |