chore(ci)(deps): bump golangci/golangci-lint-action from 6 to 9 #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, master] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| pull_request: | |
| branches: [main, master] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| permissions: | |
| contents: read | |
| # Cancel in-progress runs for the same ref | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ---- Go test matrix ---- | |
| test: | |
| name: Test (Go ${{ matrix.go-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ["1.24", "1.25"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: go test -race -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-go-${{ matrix.go-version }} | |
| path: coverage.out | |
| # ---- Lint ---- | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: latest | |
| args: --timeout=5m | |
| # ---- Binary build check ---- | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| binary: warpshift-linux-amd64 | |
| - os: windows-latest | |
| binary: warpshift-windows-amd64.exe | |
| - os: macos-latest | |
| binary: warpshift-darwin-amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Build | |
| run: | | |
| go build -trimpath -ldflags="-s -w -X main.version=ci-${GITHUB_SHA::8}" -o "${{ matrix.binary }}" ./cmd/warpshift | |
| - name: Verify binary | |
| shell: bash | |
| run: | | |
| if [ ! -f "${{ matrix.binary }}" ]; then | |
| echo "Binary not found: ${{ matrix.binary }}" | |
| exit 1 | |
| fi | |
| echo "Built: $(ls -lh ${{ matrix.binary }})" | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.binary }} | |
| path: ${{ matrix.binary }} | |
| # ---- Docker image build verification ---- | |
| docker-build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| load: false | |
| build-args: | | |
| VERSION=ci-${GITHUB_SHA::8} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # ---- CodeQL security analysis ---- | |
| codeql: | |
| name: CodeQL | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: go | |
| - name: Build | |
| run: go build ./... | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 |