Skip to content

Commit

Permalink
CI: set up go after code checkout.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickeskov committed Dec 13, 2024
1 parent 193be06 commit 964c95f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go 1.22
uses: actions/[email protected]
with:
go-version: 1.22.x
check-latest: true
cache: false # don't save & restore build caches because golangci-lint action does it internally

- name: Get dependencies
run: go mod vendor
- name: golangci-lint-soft
Expand All @@ -51,6 +53,11 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/gowaves'

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go 1.22
uses: actions/[email protected]
with:
Expand All @@ -61,11 +68,6 @@ jobs:
- name: Set up GolangCI-Lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.61.0

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get dependencies
run: go mod vendor

Expand All @@ -88,6 +90,9 @@ jobs:
github.repository == 'wavesplatform/gowaves'}}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/[email protected]
with:
Expand All @@ -96,9 +101,6 @@ jobs:
cache: true
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: go mod vendor

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
if: (github.event_name == 'workflow_dispatch' || github.event.review.state == 'APPROVED') && github.repository == 'wavesplatform/gowaves'

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/[email protected]
with:
Expand All @@ -26,9 +29,6 @@ jobs:
cache: true
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: go mod vendor

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/itests_race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
if: github.repository == 'wavesplatform/gowaves'

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/[email protected]
with:
Expand All @@ -19,9 +22,6 @@ jobs:
cache: true
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: go mod vendor

Expand Down

0 comments on commit 964c95f

Please sign in to comment.