diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 1f1eab5..181b845 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -4,10 +4,9 @@ on: push: branches: [main] pull_request: - branches: ['**'] + branches: [main] env: - golang-version: 1.18.4 golangci-lint-version: v1.46.2 jobs: @@ -18,21 +17,14 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v3 - - name: Set up Go ${{ env.golang-version }} - uses: actions/setup-go@v3.2.1 - with: - go-version: ${{ env.golang-version }} - - - name: Use Go module caching - uses: actions/cache@v3 + - name: Set up Go + uses: actions/setup-go@v5.0.1 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version: 1.22.4 + cache-dependency-path: ./go.sum - name: Build - run: go build + run: go build . - name: Test run: go test ./...