diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 3cc7ee4f7..1cda601bf 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -21,24 +21,12 @@ jobs: go-version: ${{fromJson(needs.go-versions.outputs.versions)}} runs-on: ubuntu-22.04 steps: - - name: Install Go - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: cache-paths - run: | - echo "::set-output name=cache::$(go env GOCACHE)" - echo "::set-output name=mod-cache::$(go env GOMODCACHE)" - - name: Cache go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: | - ${{ steps.cache-paths.outputs.cache }} - ${{ steps.cache-paths.outputs.mod-cache }} - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - - name: Build Test v3 - run: | - make build_test + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install Go + uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ matrix.go-version }} + - name: Build Test v3 + run: | + make build_test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index de7549018..f90c8750c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,13 +15,12 @@ jobs: name: lint runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup go uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 with: - go-version: 1.17 - cache: false - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + go-version-file: go.mod - name: Setup golangci-lint uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9285d6e15..f9f829e54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,24 +22,12 @@ jobs: os: [ubuntu-22.04, ubuntu-20.04, ubuntu-24.04, windows-2022, windows-2019, macos-13, macos-14, macos-15] runs-on: ${{ matrix.os }} steps: - - name: Install Go - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: go-env - run: | - echo "::set-output name=cache::$(go env GOCACHE)" - echo "::set-output name=mod-cache::$(go env GOMODCACHE)" - - name: Cache go modules - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 - with: - path: | - ${{ steps.go-env.outputs.cache }} - ${{ steps.go-env.outputs.mod-cache }} - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - - name: Test - run: | - go test -coverprofile='coverage.out' -covermode=atomic ./... + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install Go + uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + with: + go-version: ${{ matrix.go-version }} + - name: Test + run: | + go test -coverprofile='coverage.out' -covermode=atomic ./...