Skip to content

Merge pull request #24 from fairDataSociety/issue23 #51

Merge pull request #24 from fairDataSociety/issue23

Merge pull request #24 from fairDataSociety/issue23 #51

name: Static code analysis
on: push
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Setup dependencies
run: sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
# Run linters
- name: Run go vet
run: go vet ./...
- name: Run goimports
run: test -z $(find . -name '*.go' -type f | xargs goimports -e -d | tee /dev/stderr)
- name: Run staticcheck
run: staticcheck ./...