chore(deps)(deps): bump github/codeql-action from 3 to 4 in the github-actions group #4
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./gearbox | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache-dependency-path: gearbox/go.sum | |
| - name: Install Templ | |
| run: go install github.com/a-h/templ/cmd/templ@latest | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Generate Templ templates | |
| run: templ generate | |
| - name: Run tests | |
| run: go test -v -race -coverprofile=coverage.out ./... | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./gearbox/coverage.out | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./gearbox | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache-dependency-path: gearbox/go.sum | |
| - name: Install Templ | |
| run: go install github.com/a-h/templ/cmd/templ@latest | |
| - name: Generate Templ templates | |
| run: templ generate | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| working-directory: ./gearbox | |
| args: --timeout=5m | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./gearbox | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache-dependency-path: gearbox/go.sum | |
| - name: Install Templ | |
| run: go install github.com/a-h/templ/cmd/templ@latest | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Generate Templ templates | |
| run: templ generate | |
| - name: Build binary | |
| run: | | |
| CGO_ENABLED=0 go build \ | |
| -ldflags="-s -w -X main.Version=${{ github.ref_name }} -X main.CommitSHA=${{ github.sha }} -X main.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ | |
| -o bin/haproxy-monitor \ | |
| ./cmd/server | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: haproxy-monitor-${{ github.sha }} | |
| path: gearbox/bin/haproxy-monitor | |
| retention-days: 7 |