From 3584e4fa782a06bf113c58a2987e4d00f6b641ec Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:28:42 +0000 Subject: [PATCH] Update Go version and CI actions, add coverage report - Updated Go version to 1.24.4 in .github/workflows/go.yml to match go.mod. - Updated actions/checkout to v4, actions/setup-go to v5, and actions/upload-artifact to v4. - Added steps to generate an HTML coverage report during `make test`. - Added a step to upload the coverage report as a CI artifact. --- .github/workflows/go.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5560a36..dc2d73c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,14 +13,14 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.22.0' + go-version: '1.24.4' # go.mod / go.sumを使ったモジュールをキャッシュ - name: Cache Go modules @@ -32,5 +32,16 @@ jobs: restore-keys: ${{ runner.os }}-go-mod- - name: Build - run: make + run: make build + + - name: Test with Coverage + run: | + go test -v -coverprofile=coverage.out ./... + go tool cover -html=coverage.out -o coverage.html + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: coverage.html