chore: nix support #3
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: Lint | |
| on: | |
| push: # Run on all branches, including main | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: GolangCI Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🧾 Checkout code | |
| uses: actions/checkout@v4 | |
| - name: 📦 Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: 🧰 Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y curl git jq | |
| - name: 📥 Install golangci-lint | |
| env: | |
| GOLANGCI_LINT_VERSION: v1.64.6 | |
| run: | | |
| echo "Using golangci-lint version $GOLANGCI_LINT_VERSION" | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin $GOLANGCI_LINT_VERSION | |
| - name: 🔍 Run golangci-lint | |
| run: | | |
| if ! golangci-lint run --out-format tab | sed -E 's|^([^:]+)|\x1b[31m\1\x1b[0m|'; then | |
| echo "❌ Lint issues detected" | |
| exit 1 | |
| else | |
| echo "✅ Code is clean. No lint issues found." | |
| fi |