@@ -198,19 +198,19 @@ jobs:
198
198
- name : Echo Go Cache Paths
199
199
id : go-cache-paths
200
200
run : |
201
- echo "::set-output name=go-build:: $(go env GOCACHE)"
202
- echo "::set-output name=go-mod:: $(go env GOMODCACHE)"
201
+ echo "GOCACHE= $(go env GOCACHE)" >> $GITHUB_OUTPUT
202
+ echo "GOMODCACHE= $(go env GOMODCACHE)" >> $GITHUB_OUTPUT
203
203
204
204
- name : Go Build Cache
205
205
uses : actions/cache@v3
206
206
with :
207
- path : ${{ steps.go-cache-paths.outputs.go-build }}
207
+ path : ${{ steps.go-cache-paths.outputs.GOCACHE }}
208
208
key : ${{ github.job }}-go-build-${{ hashFiles('**/go.sum', '**/**.go') }}
209
209
210
210
- name : Go Mod Cache
211
211
uses : actions/cache@v3
212
212
with :
213
- path : ${{ steps.go-cache-paths.outputs.go-mod }}
213
+ path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
214
214
key : ${{ github.job }}-go-mod-${{ hashFiles('**/go.sum') }}
215
215
216
216
- name : Install sqlc
@@ -296,22 +296,25 @@ jobs:
296
296
with :
297
297
go-version : " ~1.19"
298
298
299
+ # Sadly the new "set output" syntax (of writing env vars to
300
+ # $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
301
+ # deprecated syntax here.
299
302
- name : Echo Go Cache Paths
300
303
id : go-cache-paths
301
304
run : |
302
- echo "::set-output name=go-build ::$(go env GOCACHE)"
303
- echo "::set-output name=go-mod ::$(go env GOMODCACHE)"
305
+ echo "::set-output name=GOCACHE ::$(go env GOCACHE)"
306
+ echo "::set-output name=GOMODCACHE ::$(go env GOMODCACHE)"
304
307
305
308
- name : Go Build Cache
306
309
uses : actions/cache@v3
307
310
with :
308
- path : ${{ steps.go-cache-paths.outputs.go-build }}
311
+ path : ${{ steps.go-cache-paths.outputs.GOCACHE }}
309
312
key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.**', '**.go') }}
310
313
311
314
- name : Go Mod Cache
312
315
uses : actions/cache@v3
313
316
with :
314
- path : ${{ steps.go-cache-paths.outputs.go-mod }}
317
+ path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
315
318
key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
316
319
317
320
- name : Install gotestsum
@@ -335,10 +338,10 @@ jobs:
335
338
# prevents test caching, so we disable it on alternate operating
336
339
# systems.
337
340
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
338
- echo ::set-output name= cover:: true
341
+ echo " cover= true" >> $GITHUB_OUTPUT
339
342
export COVERAGE_FLAGS='-covermode=atomic -coverprofile="gotests.coverage" -coverpkg=./...'
340
343
else
341
- echo ::set-output name= cover:: false
344
+ echo " cover= false" >> $GITHUB_OUTPUT
342
345
fi
343
346
344
347
gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS
@@ -380,19 +383,19 @@ jobs:
380
383
- name : Echo Go Cache Paths
381
384
id : go-cache-paths
382
385
run : |
383
- echo "::set-output name=go-build:: $(go env GOCACHE)"
384
- echo "::set-output name=go-mod:: $(go env GOMODCACHE)"
386
+ echo "GOCACHE= $(go env GOCACHE)" >> $GITHUB_OUTPUT
387
+ echo "GOMODCACHE= $(go env GOMODCACHE)" >> $GITHUB_OUTPUT
385
388
386
389
- name : Go Build Cache
387
390
uses : actions/cache@v3
388
391
with :
389
- path : ${{ steps.go-cache-paths.outputs.go-build }}
392
+ path : ${{ steps.go-cache-paths.outputs.GOCACHE }}
390
393
key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum', '**/**.go') }}
391
394
392
395
- name : Go Mod Cache
393
396
uses : actions/cache@v3
394
397
with :
395
- path : ${{ steps.go-cache-paths.outputs.go-mod }}
398
+ path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
396
399
key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
397
400
398
401
- name : Install gotestsum
@@ -429,7 +432,7 @@ jobs:
429
432
with :
430
433
token : ${{ secrets.CODECOV_TOKEN }}
431
434
files : ./gotests.coverage
432
- flags : unittest-go-postgres-${{ matrix.os }}
435
+ flags : unittest-go-postgres-linux
433
436
434
437
deploy :
435
438
name : " deploy"
@@ -463,19 +466,19 @@ jobs:
463
466
- name : Echo Go Cache Paths
464
467
id : go-cache-paths
465
468
run : |
466
- echo "::set-output name=go-build:: $(go env GOCACHE)"
467
- echo "::set-output name=go-mod:: $(go env GOMODCACHE)"
469
+ echo "GOCACHE= $(go env GOCACHE)" >> $GITHUB_OUTPUT
470
+ echo "GOMODCACHE= $(go env GOMODCACHE)" >> $GITHUB_OUTPUT
468
471
469
472
- name : Go Build Cache
470
473
uses : actions/cache@v3
471
474
with :
472
- path : ${{ steps.go-cache-paths.outputs.go-build }}
475
+ path : ${{ steps.go-cache-paths.outputs.GOCACHE }}
473
476
key : ${{ runner.os }}-release-go-build-${{ hashFiles('**/go.sum') }}
474
477
475
478
- name : Go Mod Cache
476
479
uses : actions/cache@v3
477
480
with :
478
- path : ${{ steps.go-cache-paths.outputs.go-mod }}
481
+ path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
479
482
key : ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
480
483
481
484
- name : Cache Node
@@ -607,19 +610,19 @@ jobs:
607
610
- name : Echo Go Cache Paths
608
611
id : go-cache-paths
609
612
run : |
610
- echo "::set-output name=go-build:: $(go env GOCACHE)"
611
- echo "::set-output name=go-mod:: $(go env GOMODCACHE)"
613
+ echo "GOCACHE= $(go env GOCACHE)" >> $GITHUB_OUTPUT
614
+ echo "GOMODCACHE= $(go env GOMODCACHE)" >> $GITHUB_OUTPUT
612
615
613
616
- name : Go Build Cache
614
617
uses : actions/cache@v3
615
618
with :
616
- path : ${{ steps.go-cache-paths.outputs.go-build }}
619
+ path : ${{ steps.go-cache-paths.outputs.GOCACHE }}
617
620
key : ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
618
621
619
622
- name : Go Mod Cache
620
623
uses : actions/cache@v3
621
624
with :
622
- path : ${{ steps.go-cache-paths.outputs.go-mod }}
625
+ path : ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
623
626
key : ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
624
627
625
628
- name : Build
0 commit comments