From af525760f712cf0934d13adfd522cecb71916eb7 Mon Sep 17 00:00:00 2001 From: Yutaka Ichibangase Date: Sat, 5 Oct 2024 11:16:15 +0900 Subject: [PATCH] update go.yml --- .github/workflows/go.yml | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9c2e211d..860e32a4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,28 +1,18 @@ name: Go -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] +on: [push, pull_request] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.19 - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic - - - name: Codecov - uses: codecov/codecov-action@v2.1.0 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: Gather dependencies + run: go mod download + - name: Run coverage + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4