@@ -27,22 +27,88 @@ jobs:
2727 - uses : actions/checkout@v5
2828 - uses : arnested/go-version-action@v1
2929 id : versions
30- build :
30+ build-linux-amd64 :
3131 runs-on : ubuntu-latest
3232 needs : go-versions
3333 continue-on-error : true # make sure to run all versions, even if one fails
3434 strategy :
35+ fail-fast : false # continue to run all jobs even if one fails
3536 matrix :
36- go-versions : ${{ fromJSON(needs.go-versions.outputs.matrix) }}
37+ go-version : ${{ fromJSON(needs.go-versions.outputs.matrix) }}
38+ name : >
39+ Build with Go ${{ matrix.go-version }}
40+ for linux/amd64
3741 steps :
3842 - uses : actions/checkout@v5
3943 - name : Set up Go
4044 uses : actions/setup-go@v6
4145 with :
42- go-version : ${{ matrix.go-versions }}
46+ go-version : ${{ matrix.go-version }}
4347 - name : Run go vet
4448 run : go vet ./...
45- - name : Run yaml-test-suit tests
49+ - name : Run yaml-test-suite tests
4650 run : make test-yts
51+ - name : Run go test with race detection
52+ run : go test -v -race .
53+
54+ build-others :
55+ runs-on : ${{ matrix.os }}
56+ continue-on-error : true # make sure to run all versions, even if one fails
57+ strategy :
58+ fail-fast : false # continue to run all jobs even if one fails
59+ matrix :
60+ include :
61+ - {
62+ os : macos-latest,
63+ GOOS : darwin,
64+ GOARCH : amd64,
65+ test-args : -race
66+ }
67+ - {
68+ os : macos-latest,
69+ GOOS : darwin,
70+ GOARCH : arm64,
71+ test-args : -race
72+ }
73+ - {
74+ os : windows-latest,
75+ GOOS : windows,
76+ GOARCH : amd64,
77+ test-args : -race
78+ }
79+ - {
80+ os : ubuntu-latest,
81+ GOOS : linux,
82+ GOARCH : 386,
83+ test-args : ' ' # race is not available on 32 bits architecture
84+ }
85+ - {
86+ os : windows-latest,
87+ GOOS : windows,
88+ GOARCH : 386,
89+ test-args : ' ' # race is not available on 32 bits architecture
90+ }
91+ env :
92+ # GOARCH and GOOS are used by the Go toolchain
93+ GOARCH : ${{ matrix.GOARCH }}
94+ GOOS : ${{ matrix.GOOS }}
95+ name : >
96+ Build with Go ${{ matrix.go-version }}
97+ for ${{ matrix.GOOS }}/${{ matrix.GOARCH }}
98+ steps :
99+ - uses : actions/checkout@v5
100+ - name : Set up Go
101+ uses : actions/setup-go@v6
102+ with :
103+ go-version : ${{ matrix.go-version }}
104+ - name : Run go vet
105+ run : go vet ./...
106+ - name : Run yaml-test-suite tests
107+ run : make test-yts
108+ # make test-yts can only be run on non-Windows OS
109+ if : ${{ matrix.GOOS != 'windows' }}
110+ env :
111+ # This one is used by makeplus/makes
112+ OS-TYPE : ${{ matrix.GOOS }}
47113 - name : Run go test
48- run : GO111MODULE=on go test -v -race .
114+ run : go test -v ${{ matrix.test-args }} .
0 commit comments