actions: check of testplan exists

Check if test plan exist before trying to read it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2021-11-24 23:01:45 -05:00
parent 0b2df8f41c
commit 3fcecc3b11

View file

@ -75,7 +75,11 @@ jobs:
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request
# get number of tests
lines=$(wc -l < testplan.csv)
if [ -s testplan.csv ]; then
lines=$(wc -l < testplan.csv)
else
lines=1
fi
if [ "$lines" = 1 ]; then
# no tests, so we need 0 nodes
nodes=0