From 53621c64024a5f19573e909448e03adc0a6f60b4 Mon Sep 17 00:00:00 2001 From: TanishqSingla Date: Sat, 19 Oct 2024 03:32:53 +0530 Subject: [PATCH] fix: checkout versions --- .github/workflows/go-test.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index d763076..5feb40f 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -1,8 +1,7 @@ -name: Go Test - on: pull_request: - branches: [master] + branches: + - master jobs: test: @@ -10,15 +9,26 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v4 + with: + go-version: '1.23' + + - name: Cache Go modules + uses: actions/cache@v3 with: - go-version: '1.23.0' + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Install dependencies - run: go mod tidy + run: | + go mod download # Download modules - name: Run tests run: go test -v ./...