all: migrate license from MPL-2.0 to AGPL-3.0-or-later #16
This file contains hidden or 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: "Linter" | |
| on: | |
| push: | |
| paths: | |
| - '**.go' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/**' # Re-run if workflows change*.go' | |
| pull_request: | |
| paths: | |
| - '**.go' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/**' # Re-run if workflows change*.go' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Go environment | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: "1.23.x" | |
| - name: Get dependencies | |
| run: sudo apt-get update && sudo apt-get install -y 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 | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run goimports check | |
| run: test -z "$(find . -name '*.go' -type f | xargs goimports -e -d | tee /dev/stderr)" | |
| - name: Run staticcheck | |
| run: staticcheck ./... |