Skip to content

Commit d2d2b54

Browse files
committed
fix(go-test): fix bug introduced by opt-out -race which broke test options
In particular, test packages specification and coverage options were dropped. Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent a673fdc commit d2d2b54

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎.github/workflows/go-test-monorepo.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,13 @@ jobs:
205205
RACEOPT=""
206206
fi
207207
208+
# ${RACEOPT} unquoted on purpose: quoted, an empty value passes '' as a package
209+
# pattern, and go test then runs nothing and still exits 0.
208210
gotestsum \
209211
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json' \
210212
-- \
211213
work \
212-
"${RACEOPT}" \
214+
${RACEOPT} \
213215
-p 2 \
214216
-count 1 \
215217
-timeout="${TIMEOUT}" \
@@ -238,10 +240,11 @@ jobs:
238240
RACEOPT=""
239241
fi
240242
243+
# ${RACEOPT} unquoted on purpose -- see the note in the go.work step above.
241244
gotestsum \
242245
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json' \
243246
-- \
244-
"${RACEOPT}" \
247+
${RACEOPT} \
245248
-p 2 \
246249
-count 1 \
247250
-timeout="${TIMEOUT}" \

‎.github/workflows/go-test.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ jobs:
139139
RACEOPT=""
140140
fi
141141
142+
# ${RACEOPT} unquoted on purpose: quoted, an empty value passes '' as a package
143+
# pattern, and go test then runs nothing and still exits 0.
142144
gotestsum \
143145
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json' \
144146
-- \
145-
"${RACEOPT}" \
147+
${RACEOPT} \
146148
-p 2 \
147149
-count 1 \
148150
-timeout="${TIMEOUT}" \

0 commit comments

Comments
 (0)