Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Commit 175f96e

Browse files
committed
update .github/workflows/go-test.yml
1 parent ec141af commit 175f96e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/go-test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ "ubuntu", "windows", "macos" ]
13-
go: [ "1.17.x", "1.18.x" ]
13+
go: [ "1.18.x", "1.19.x" ]
1414
env:
1515
COVERAGES: ""
16-
runs-on: ${{ matrix.os }}-latest
17-
name: ${{ matrix.os}} (go ${{ matrix.go }})
16+
runs-on: ${{ format('{0}-latest', matrix.os) }}
17+
name: ${{ matrix.os }} (go ${{ matrix.go }})
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
with:
2121
submodules: recursive
22-
- uses: actions/setup-go@v2
22+
- uses: actions/setup-go@v3
2323
with:
2424
go-version: ${{ matrix.go }}
2525
- name: Go information
@@ -43,14 +43,16 @@ jobs:
4343
# Use -coverpkg=./..., so that we include cross-package coverage.
4444
# If package ./A imports ./B, and ./A's tests also cover ./B,
4545
# this means ./B's coverage will be significantly higher than 0%.
46-
run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./...
46+
run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./...
4747
- name: Run tests (32 bit)
4848
if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
4949
uses: protocol/[email protected]
5050
env:
5151
GOARCH: 386
5252
with:
53-
run: go test -v ./...
53+
run: |
54+
export "PATH=${{ env.PATH_386 }}:$PATH"
55+
go test -v -shuffle=on ./...
5456
- name: Run tests with race detector
5557
if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
5658
uses: protocol/[email protected]
@@ -60,7 +62,7 @@ jobs:
6062
shell: bash
6163
run: echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
6264
- name: Upload coverage to Codecov
63-
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
65+
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
6466
with:
6567
files: '${{ env.COVERAGES }}'
6668
env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }}

0 commit comments

Comments
 (0)