Skip to content

Commit a033633

Browse files
fix(ci): convert space-separated wildcard suites to comma-separated
scalatest-maven-plugin splits wildcardSuites on commas and passes each entry as a separate -w arg to the ScalaTest runner. The YAML >- folded scalar collapses line breaks to spaces, so the whole package list was passed as one garbage package name -> 0 tests found. Fix: FILTER=$(echo ... | tr ' ' ',') before the mvn call.
1 parent e388aea commit a033633

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

.github/workflows/build_container.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,12 @@ jobs:
237237
238238
- name: Run tests — shard ${{ matrix.shard }} (${{ matrix.name }})
239239
run: |
240-
# mvn test runs the full lifecycle. With compiled classes already
241-
# present in target/ (from the artifact), Zinc incremental compilation
242-
# detects no source changes and skips recompilation. Tests are run by
243-
# scalatest-maven-plugin (surefire is disabled in pom.xml).
244-
# -DwildcardSuites filters to the packages for this shard.
245-
# See README.md: "mvn -DwildcardSuites=code.api.directloginTest test"
240+
# wildcardSuites requires comma-separated package prefixes (-w per entry).
241+
# The YAML >- scalar collapses newlines to spaces, so we convert here.
242+
FILTER=$(echo "${{ matrix.test_filter }}" | tr ' ' ',')
246243
MAVEN_OPTS="-Xmx3G -Xss2m -XX:MaxMetaspaceSize=1G" \
247244
mvn test \
248-
-DwildcardSuites="${{ matrix.test_filter }}" \
245+
-DwildcardSuites="$FILTER" \
249246
> maven-build-shard${{ matrix.shard }}.log 2>&1
250247
251248
- name: Report failing tests — shard ${{ matrix.shard }}

.github/workflows/build_pull_request.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,12 @@ jobs:
237237
238238
- name: Run tests — shard ${{ matrix.shard }} (${{ matrix.name }})
239239
run: |
240-
# mvn test runs the full lifecycle. With compiled classes already
241-
# present in target/ (from the artifact), Zinc incremental compilation
242-
# detects no source changes and skips recompilation. Tests are run by
243-
# scalatest-maven-plugin (surefire is disabled in pom.xml).
244-
# -DwildcardSuites filters to the packages for this shard.
245-
# See README.md: "mvn -DwildcardSuites=code.api.directloginTest test"
240+
# wildcardSuites requires comma-separated package prefixes (-w per entry).
241+
# The YAML >- scalar collapses newlines to spaces, so we convert here.
242+
FILTER=$(echo "${{ matrix.test_filter }}" | tr ' ' ',')
246243
MAVEN_OPTS="-Xmx3G -Xss2m -XX:MaxMetaspaceSize=1G" \
247244
mvn test \
248-
-DwildcardSuites="${{ matrix.test_filter }}" \
245+
-DwildcardSuites="$FILTER" \
249246
> maven-build-shard${{ matrix.shard }}.log 2>&1
250247
251248
- name: Report failing tests — shard ${{ matrix.shard }}

0 commit comments

Comments
 (0)