From 88edf60cdef536d49b62f2e900df71c9fb7c70c4 Mon Sep 17 00:00:00 2001 From: krrrr38 Date: Wed, 30 Sep 2026 13:21:41 +0900 Subject: [PATCH] =?UTF-8?q?Go=20=E3=81=AE=E5=AF=BE=E8=B1=A1=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=201.25=20/=201.26?= =?UTF-8?q?=20/=201.27=20=E3=81=AB=E3=81=97=E3=81=A6=20CI=20=E3=82=92=20ma?= =?UTF-8?q?trix=20=E5=8C=96=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EOL の 1.24 以前を対象外にし、go.mod を go 1.25.0 に上げる。 patch 番号なしの go 1.22 は toolchain 切り替え時に存在しない版として 解決され toolchain not found になり得るため、patch 付きで記述する。 test-go.yml は 1.25 / 1.26 / 1.27 の matrix で実行し、GOTOOLCHAIN=local で 指定バージョンのまま検証する。 Co-Authored-By: Claude Opus 5.5 Signed-off-by: krrrr38 --- .github/workflows/test-go.yml | 11 +++++++++-- golang/README.md | 2 +- golang/go.mod | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index a377324..85cb6a2 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -9,20 +9,27 @@ permissions: jobs: build: runs-on: ubuntu-latest - name: Build + name: Build (Go ${{ matrix.go-version }}) + strategy: + matrix: + go-version: ['1.25', '1.26', '1.27'] timeout-minutes: 5 defaults: run: working-directory: golang permissions: contents: read + env: + # matrix で指定したバージョンのまま検証するため、toolchain の自動切り替えを止める + GOTOOLCHAIN: local steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: - go-version-file: 'golang/go.mod' + go-version: ${{ matrix.go-version }} + cache-dependency-path: 'golang/go.sum' cache: true - run: go mod download - name: Verify interview template and patch diff --git a/golang/README.md b/golang/README.md index 231f490..ccdbf99 100644 --- a/golang/README.md +++ b/golang/README.md @@ -2,7 +2,7 @@ ## 開発 -- Go 1.22+ +- Go 1.25+ ```shell # 準備 diff --git a/golang/go.mod b/golang/go.mod index 6aebcf4..06c3c50 100644 --- a/golang/go.mod +++ b/golang/go.mod @@ -1,5 +1,5 @@ module folio/codinginterview -go 1.22 +go 1.25.0 require github.com/shopspring/decimal v1.4.0