ci: fail a tests job is there are no test results (#14884)

This commit is contained in:
Alexey Kuzmin 2018-10-01 16:59:55 +02:00 committed by GitHub
parent ec38561254
commit 4af922c9a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -534,7 +534,14 @@ steps-tests: &steps-tests
cd src
export ELECTRON_OUT_DIR=Default
(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:
path: src/junit