Skip to content

Commit 0e85305

Browse files
dtscalacstevenj
andauthored
fix(cat-voices): make sure ci job fails when test fail (#969)
* chore: move blueprint to correct dir * chore: fail melos script if any of executed commands fails * chore: defer exit code until test_reports and coverage are saved * chore: update ci version * chore: update catalyst-ci --------- Co-authored-by: Steven Johnson <[email protected]>
1 parent 27dfc57 commit 0e85305

File tree

11 files changed

+21
-13
lines changed

11 files changed

+21
-13
lines changed

Earthfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.15 AS mdlint-ci
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.15 AS cspell-ci
5-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.15 AS postgresql-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.16 AS mdlint-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.16 AS cspell-ci
5+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.16 AS postgresql-ci
66

77
FROM debian:stable-slim
88

catalyst-gateway/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.15 AS rust-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.16 AS rust-ci
44

55
#cspell: words rustfmt toolsets USERARCH stdcfgs
66

catalyst-gateway/event-db/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# the database and its associated software.
44
VERSION 0.8
55

6-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.15 AS postgresql-ci
6+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.2.16 AS postgresql-ci
77

88
# cspell: words
99

catalyst-gateway/tests/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 0.8
2-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.2.15 AS spectral-ci
2+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.2.16 AS spectral-ci
33

44
# test-lint-openapi - OpenAPI linting from an artifact
55
# testing whether the OpenAPI generated during build stage follows good practice.

catalyst-gateway/tests/api_tests/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.2.15 AS python-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.2.16 AS python-ci
44

55
builder:
66
FROM python-ci+python-base

catalyst_voices/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION 0.8
22

33
IMPORT ../catalyst-gateway AS catalyst-gateway
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.15 AS flutter-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.16 AS flutter-ci
55

66
# Copy all the necessary files and running bootstrap
77
builder:

catalyst_voices/uikit_example/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION 0.8
22

33
IMPORT ../ AS catalyst-voices
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.15 AS flutter-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.16 AS flutter-ci
55

66
# local-build-web - build web version of UIKit example.
77
# Prefixed by "local" to make sure it's not auto triggered, the target was

catalyst_voices_packages/catalyst_cardano/catalyst_cardano/wallet-automation/Earthfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
2-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.15 AS flutter-ci
3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:v3.2.15 AS playwright-ci
2+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.2.16 AS flutter-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/playwright:v3.2.16 AS playwright-ci
44

55
deps:
66
DO playwright-ci+SETUP --workdir=/wallet-automation

docs/Earthfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.15 AS docs-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.16 AS docs-ci
44

55
IMPORT .. AS repo
66
IMPORT ../catalyst-gateway AS catalyst-gateway

melos.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,14 @@ scripts:
182182
183183
# run tests, generate junit reports in /test_reports/ & code coverage report
184184
melos exec -c 1 --dir-exists="test" -- \
185-
"flutter test --reporter expanded --coverage --machine | tojunit --output $MELOS_ROOT_PATH/test_reports/MELOS_PACKAGE_NAME.junit-report.xml"
185+
'OUTPUT=$(flutter test --reporter expanded --coverage --machine) ; \
186+
EXIT_CODE=$? ; \
187+
printf "%s" "$OUTPUT" | tojunit --output $MELOS_ROOT_PATH/test_reports/$MELOS_PACKAGE_NAME.junit-report.xml ; \
188+
exit $EXIT_CODE'
189+
190+
# store the exit code after running the tests,
191+
# this is the exit code for the whole script
192+
EXIT_CODE=$?
186193
187194
# removes code coverage for generated code
188195
melos exec -c 1 --dir-exists="test" -- \
@@ -194,6 +201,7 @@ scripts:
194201
'lib/generated/**'
195202
196203
dart pub global run combine_coverage --repo-path=.
204+
exit $EXIT_CODE
197205
198206
description: |
199207
Run `flutter test` for all packages and generate junit and coverage reports.

0 commit comments

Comments
 (0)