Skip to content

Commit fd88bd1

Browse files
committed
Use testname format (again) in CI
I find it a lot easier to spot failed tests with this format, and I also appreciate that it gives a summary of how long each test took to run. Default to standard-verbose for when folks run locally. Signed-off-by: Nic Cope <[email protected]>
1 parent 06441c3 commit fd88bd1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ jobs:
288288
- name: Run E2E Tests
289289
run: |
290290
earthly --strict --allow-privileged --remote-cache ghcr.io/crossplane/earthly-cache:${{ github.job }}-${{ matrix.test-suite}} \
291-
+e2e --FLAGS="-test.failfast -fail-fast -prior-crossplane-version=${CROSSPLANE_PRIOR_VERSION} --test-suite ${{ matrix.test-suite }}"
291+
+e2e --GOTESTSUM_FORMAT="testname" --FLAGS="-test.failfast -fail-fast -prior-crossplane-version=${CROSSPLANE_PRIOR_VERSION} --test-suite ${{ matrix.test-suite }}"
292292
293293
- name: Publish E2E Test Flakes
294294
if: '!cancelled()'

Earthfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ e2e:
5151
ARG GOARCH=${TARGETARCH}
5252
ARG GOOS=${TARGETOS}
5353
ARG FLAGS="-test-suite=base"
54+
ARG GOTESTSUM_FORMAT="standard-verbose"
5455
# Using earthly image to allow compatibility with different development environments e.g. WSL
5556
FROM earthly/dind:alpine-3.20-docker-26.1.5-r0
5657
RUN wget https://dl.google.com/go/go${GO_VERSION}.${GOOS}-${GOARCH}.tar.gz
@@ -74,15 +75,13 @@ e2e:
7475
RUN gotestsum \
7576
--rerun-fails \
7677
--no-color=false \
77-
--format standard-verbose \
78-
--jsonfile e2e-tests.json \
78+
--format ${GOTESTSUM_FORMAT} \
7979
--junitfile e2e-tests.xml \
8080
--raw-command go tool test2json -t -p E2E ./e2e -test.v ${FLAGS}
8181
END
8282
FINALLY
8383
SAVE ARTIFACT --if-exists e2e-tests.xml AS LOCAL _output/tests/e2e-tests.xml
8484
END
85-
RUN gotestsum tool slowest --jsonfile e2e-tests.json
8685

8786
# hack builds Crossplane, and deploys it to a kind cluster. It runs in your
8887
# local environment, not a container. The kind cluster will keep running until

0 commit comments

Comments
 (0)