ci: fail a tests job is there are no test results (#14884)
This commit is contained in:
parent
ec38561254
commit
4af922c9a2
1 changed files with 8 additions and 1 deletions
|
@ -534,7 +534,14 @@ steps-tests: &steps-tests
|
||||||
cd src
|
cd src
|
||||||
export ELECTRON_OUT_DIR=Default
|
export ELECTRON_OUT_DIR=Default
|
||||||
(cd electron && npm run test -- --ci --enable-logging)
|
(cd electron && npm run test -- --ci --enable-logging)
|
||||||
|
- run:
|
||||||
|
name: Check test results existence
|
||||||
|
command: |
|
||||||
|
MOCHA_FILE='src/junit/test-results.xml'
|
||||||
|
# Check if it exists and not empty.
|
||||||
|
if [ ! -s "$MOCHA_FILE" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: src/junit
|
path: src/junit
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue