@@ -126,7 +126,6 @@ jobs:
126126 -exec echo "::endgroup::" \;
127127 || true
128128
129-
130129 sytest :
131130 needs : check_repo
132131 if : needs.check_repo.outputs.should_run_workflow == 'true'
@@ -181,7 +180,6 @@ jobs:
181180 /logs/results.tap
182181 /logs/**/*.log*
183182
184-
185183 complement :
186184 needs : check_repo
187185 if : " !failure() && !cancelled() && needs.check_repo.outputs.should_run_workflow == 'true'"
@@ -214,11 +212,53 @@ jobs:
214212 cache-dependency-path : complement/go.sum
215213 go-version-file : complement/go.mod
216214
217- - run : |
215+ - name : Run Complement Tests
216+ id : run_complement_tests
217+ # -p=1: We're using `-p 1` to force the test packages to run serially as GHA boxes
218+ # are underpowered and don't like running tons of Synapse instances at once.
219+ # -json: Output JSON format so that gotestfmt can parse it.
220+ #
221+ # tee /tmp/gotest-complement.log: We tee the output to a file so that we can re-process it
222+ # later on for better formatting with gotestfmt. But we still want the command
223+ # to output to the terminal as it runs so we can see what's happening in
224+ # real-time.
225+ run : |
218226 set -o pipefail
219- TEST_ONLY_IGNORE_POETRY_LOCKFILE=1 POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} WORKERS=${{ (matrix.arrangement == 'workers') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
227+ COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -p 1 - json 2>&1 | tee /tmp/gotest-complement.log
220228 shell : bash
221- name: Run Complement Tests
229+ env :
230+ POSTGRES : ${{ (matrix.database == 'Postgres') && 1 || '' }}
231+ WORKERS : ${{ (matrix.arrangement == 'workers') && 1 || '' }}
232+ TEST_ONLY_IGNORE_POETRY_LOCKFILE : 1
233+
234+ - name : Formatted Complement test logs
235+ # Always run this step if we attempted to run the Complement tests.
236+ if : always() && steps.run_complement_tests.outcome != 'skipped'
237+ run : cat /tmp/gotest-complement.log | gotestfmt -hide "successful-downloads,empty-packages"
238+
239+ - name : Run in-repo Complement Tests
240+ id : run_in_repo_complement_tests
241+ # -p=1: We're using `-p 1` to force the test packages to run serially as GHA boxes
242+ # are underpowered and don't like running tons of Synapse instances at once.
243+ # -json: Output JSON format so that gotestfmt can parse it.
244+ #
245+ # tee /tmp/gotest-in-repo-complement.log: We tee the output to a file so that we can re-process it
246+ # later on for better formatting with gotestfmt. But we still want the command
247+ # to output to the terminal as it runs so we can see what's happening in
248+ # real-time.
249+ run : |
250+ set -o pipefail
251+ COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh --in-repo -p 1 -json 2>&1 | tee /tmp/gotest-in-repo-complement.log
252+ shell : bash
253+ env :
254+ POSTGRES : ${{ (matrix.database == 'Postgres') && 1 || '' }}
255+ WORKERS : ${{ (matrix.arrangement == 'workers') && 1 || '' }}
256+ TEST_ONLY_IGNORE_POETRY_LOCKFILE : 1
257+
258+ - name : Formatted in-repo Complement test logs
259+ # Always run this step if we attempted to run the Complement tests.
260+ if : always() && steps.run_in_repo_complement_tests.outcome != 'skipped'
261+ run : cat /tmp/gotest-in-repo-complement.log | gotestfmt -hide "successful-downloads,empty-packages"
222262
223263 # Open an issue if the build fails, so we know about it.
224264 # Only do this if we're not experimenting with this action in a PR.
0 commit comments