diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c1136d5d..3a939f19d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -226,18 +226,50 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Code quality test - uses: golangci/golangci-lint-action@v4 - with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: latest - - # Run govulncheck on the latest go version, the one we build binaries with - name: Install Go uses: actions/setup-go@v5 with: go-version: '>=1.22.0-rc.1' check-latest: true + cache: false + + - name: Code quality test (Linux) + uses: golangci/golangci-lint-action@v4 + with: + version: latest + skip-cache: false # Caching enabled (which is default) on this first lint step only, it handles complete cache of build, go modules and golangci-lint analysis which was necessary to get all lint steps to properly take advantage of it + + - name: Code quality test (Windows) + uses: golangci/golangci-lint-action@v4 + env: + GOOS: "windows" + with: + version: latest + skip-cache: true + + - name: Code quality test (macOS) + uses: golangci/golangci-lint-action@v4 + env: + GOOS: "darwin" + with: + version: latest + skip-cache: true + + - name: Code quality test (FreeBSD) + uses: golangci/golangci-lint-action@v4 + env: + GOOS: "freebsd" + with: + version: latest + skip-cache: true + + - name: Code quality test (OpenBSD) + uses: golangci/golangci-lint-action@v4 + env: + GOOS: "openbsd" + with: + version: latest + skip-cache: true - name: Install govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@latest