File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : " Setup environment"
22description : " This action install node, pnpm & Go toolchain"
3+ inputs :
4+ setup-go :
5+ # TODO: wgc router plugin build downloads its own Go toolchain (1.24.x) and uses it
6+ # for compilation. When actions/setup-go runs first it sets GOTOOLCHAIN=local, which
7+ # prevents that downloaded Go from auto-upgrading to satisfy go.mod's go directive,
8+ # causing the build to fail. Disable setup-go for jobs that rely on wgc's toolchain
9+ # management until wgc supports using the system Go or exposes a flag for it.
10+ description : " Whether to install the Go toolchain"
11+ default : " false"
12+ required : false
313
414runs :
515 using : " composite"
919 node-version : lts/*
1020
1121 - uses : pnpm/action-setup@v5.0.0
22+ id : pnpm-install
1223 with :
13- run_install : true
14- - uses : actions/setup-go@v5
24+ run_install : false
25+
26+ - name : Get pnpm store directory
27+ shell : bash
28+ id : pnpm-cache
29+ run : echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
30+
31+ - uses : actions/cache@v5.0.4
32+ name : Setup pnpm cache
33+ with :
34+ path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
35+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+ restore-keys : |
37+ ${{ runner.os }}-pnpm-store-
38+
39+ - name : Install dependencies
40+ shell : bash
41+ run : pnpm install
42+
43+ - uses : actions/setup-go@v6.3.0
44+ if : ${{ inputs.setup-go == 'true' }}
1545 with :
1646 go-version : 1.25.1
47+ cache-dependency-path : ' **/go.sum'
Original file line number Diff line number Diff line change @@ -14,17 +14,19 @@ jobs:
1414 name : Build
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v6
17+ - uses : actions/checkout@v6.0.2
1818 - uses : ./.github/actions/setup
1919 - run : make build-ci
2020 lint_and_format :
2121 name : Lint & Format
2222 runs-on : ubuntu-latest
2323 steps :
24- - uses : actions/checkout@v6
24+ - uses : actions/checkout@v6.0.2
2525 - uses : ./.github/actions/setup
26+ with :
27+ setup-go : " true"
2628 - name : golangci-lint
27- uses : golangci/golangci-lint-action@v9
29+ uses : golangci/golangci-lint-action@v9.2.0
2830 with :
2931 version : v2.11.3
3032 install-only : true
4042 name : Test
4143 runs-on : ubuntu-latest
4244 steps :
43- - uses : actions/checkout@v6
45+ - uses : actions/checkout@v6.0.2
4446 - uses : ./.github/actions/setup
47+ with :
48+ setup-go : " true"
4549 - run : make test-ci
You can’t perform that action at this time.
0 commit comments