From 7b7c41b2f9e705675cc5b11881e0124dd01a7379 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 8 Nov 2026 00:57:01 +0000 Subject: [PATCH 1/3] ci: use Go 1.27 and pin GitHub Actions to commit SHAs Amp-Thread-ID: https://ampcode.com/threads/T-01a1b893-07c3-7507-afd4-7e8161140208 Co-authored-by: Amp --- .github/workflows/go.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 28e14ef..16c4d81 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -22,9 +22,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install Go + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version: 1.27.x - name: Run golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: version: latest args: --timeout=30m @@ -33,20 +37,20 @@ jobs: name: Test strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.27.x ] platform: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.platform }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ matrix.go-version }} - name: Run tests with coverage run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./... - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v1.5.0 + uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: - file: ./coverage + files: ./coverage flags: unittests From db996988cd2e8b88f2505ac951c0c85a19066e2a Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 8 Nov 2026 01:35:58 +0000 Subject: [PATCH 2/3] ci: align golangci-lint config with flamego/flamego Amp-Thread-ID: https://ampcode.com/threads/T-01a1b893-07c3-7507-afd4-7e8161140208 Co-authored-by: Amp --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 6937629..c8c1f59 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,6 +6,12 @@ linters: - unconvert - unparam settings: + staticcheck: + checks: + - all + - "-SA1019" # This project is under active refactoring and not all code is up to date. + - "-QF1001" # I'm a math noob + - "-ST1016" # Some legit code uses this pattern nakedret: max-func-lines: 0 # Disallow any unnamed return statement exclusions: From 81494307f60f6bcc44f70f5c2b43db641211ddba Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 8 Nov 2026 14:20:02 +0000 Subject: [PATCH 3/3] ci: drop SA1019 and ST1016 exclusions from golangci-lint config Amp-Thread-ID: https://ampcode.com/threads/T-01a1b893-07c3-7507-afd4-7e8161140208 Co-authored-by: Amp --- .golangci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c8c1f59..e49a45f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,9 +9,7 @@ linters: staticcheck: checks: - all - - "-SA1019" # This project is under active refactoring and not all code is up to date. - "-QF1001" # I'm a math noob - - "-ST1016" # Some legit code uses this pattern nakedret: max-func-lines: 0 # Disallow any unnamed return statement exclusions: