@@ -17,20 +17,24 @@ jobs:
1717 runs-on : ubuntu-latest
1818
1919 steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v3
22+
23+ - name : Read go.version
24+ run : |
25+ echo "GO_VERSION=$(cat go.version)" >> $GITHUB_ENV
26+
2027 - name : Set up Go 1.x
2128 uses : actions/setup-go@v3
2229 with :
23- go-version : 1.23.10
30+ go-version : ${{ env.GO_VERSION }}
2431 id : go
2532
2633 - name : Setup Node.js environment
2734 uses : actions/setup-node@v3
2835 with :
2936 node-version : 18
3037
31- - name : Check out code into the Go module directory
32- uses : actions/checkout@v3
33-
3438 - name : Ensure all platforms can be built
3539 run : make platform-all
3640
@@ -47,20 +51,24 @@ jobs:
4751 runs-on : ubuntu-latest
4852
4953 steps :
54+ - name : Checkout code
55+ uses : actions/checkout@v3
56+
57+ - name : Read go.version
58+ run : |
59+ echo "GO_VERSION=$(cat go.version)" >> $GITHUB_ENV
60+
5061 - name : Set up Go 1.x
5162 uses : actions/setup-go@v3
5263 with :
53- go-version : 1.23.10
64+ go-version : ${{ env.GO_VERSION }}
5465 id : go
5566
5667 - name : Setup Node.js environment
5768 uses : actions/setup-node@v3
5869 with :
5970 node-version : 16
6071
61- - name : Check out code into the Go module directory
62- uses : actions/checkout@v3
63-
6472 # Note: These tests break with node version 18. Something about WebAssembly.
6573 - name : Rollup Tests
6674 run : make test-rollup
@@ -79,10 +87,23 @@ jobs:
7987 os : [ubuntu-latest, macos-latest, windows-latest]
8088
8189 steps :
90+ - name : Checkout code
91+ uses : actions/checkout@v3
92+
93+ - name : Read go.version (non-Windows)
94+ if : matrix.os != 'windows-latest'
95+ run : |
96+ echo "GO_VERSION=$(cat go.version)" >> $GITHUB_ENV
97+
98+ - name : Read go.version (Windows)
99+ if : matrix.os == 'windows-latest'
100+ run : |
101+ echo "GO_VERSION=$(cat go.version)" >> $Env:GITHUB_ENV
102+
82103 - name : Set up Go 1.x
83104 uses : actions/setup-go@v3
84105 with :
85- go-version : 1.23.10
106+ go-version : ${{ env.GO_VERSION }}
86107 id : go
87108
88109 - name : Setup Node.js environment
95116 with :
96117 deno-version : v1.40.0
97118
98- - name : Check out code into the Go module directory
99- uses : actions/checkout@v3
100-
101119 - name : go test
102120 run : go test -race ./internal/...
103121
@@ -207,15 +225,15 @@ jobs:
207225 runs-on : ubuntu-latest
208226
209227 steps :
228+ - name : Checkout code
229+ uses : actions/checkout@v3
230+
210231 - name : Set up Go 1.13 (the minimum required Go version for esbuild)
211232 uses : actions/setup-go@v3
212233 with :
213234 go-version : 1.13
214235 id : go
215236
216- - name : Check out code into the Go module directory
217- uses : actions/checkout@v3
218-
219237 - name : go build
220238 run : go build ./cmd/esbuild
221239
@@ -271,10 +289,23 @@ jobs:
271289 os : [ubuntu-latest, windows-latest]
272290
273291 steps :
292+ - name : Checkout code
293+ uses : actions/checkout@v3
294+
295+ - name : Read go.version (non-Windows)
296+ if : matrix.os != 'windows-latest'
297+ run : |
298+ echo "GO_VERSION=$(cat go.version)" >> $GITHUB_ENV
299+
300+ - name : Read go.version (Windows)
301+ if : matrix.os == 'windows-latest'
302+ run : |
303+ echo "GO_VERSION=$(cat go.version)" >> $Env:GITHUB_ENV
304+
274305 - name : Set up Go 1.x
275306 uses : actions/setup-go@v3
276307 with :
277- go-version : 1.23.10
308+ go-version : ${{ env.GO_VERSION }}
278309 id : go
279310
280311 # Make sure esbuild works with old versions of Deno. Note: It's important
@@ -284,9 +315,6 @@ jobs:
284315 with :
285316 deno-version : v1.24.0
286317
287- - name : Check out code into the Go module directory
288- uses : actions/checkout@v3
289-
290318 - name : Deno Tests (non-Windows)
291319 if : matrix.os != 'windows-latest'
292320 run : make test-deno
0 commit comments