From 5817b08c432a2c1843be0e7cee161be4e00e99ff Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Wed, 24 May 2023 17:22:01 +0800 Subject: [PATCH] Update ci.yml upgrade actions/setup-go@v4 to support cache by default --- .github/workflows/ci.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df39e54..46cf8a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,23 +18,10 @@ jobs: uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.goVer }} - - - name: Setup Environment - run: | - echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - - name: Module cache - uses: actions/cache@v3 - env: - cache-name: go-mod-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - + - name: Test with Coverage run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./... env: @@ -48,4 +35,4 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: - files: ./coverage1.txt,./coverage2.txt \ No newline at end of file + files: ./coverage1.txt,./coverage2.txt