Skip to content

Commit 68bcbbc

Browse files
authored
Update CI.sh
Uncomment example execution.
1 parent 686c7db commit 68bcbbc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

CI.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ else
6262
bin/phpspec run --config=phpspec.yml --bootstrap=./vendor/autoload.php --no-interaction --format=pretty
6363
fi
6464

65-
#echo "*** [${this_script}] Running examples"
66-
#pushd examples
67-
#for example in $(ls *.php); do
68-
# echo "*** [${this_script}] Running ${example} with PHP ${version}"
69-
# php ${example} --key ${ROSETTE_API_KEY} > "${example}-output.txt" 2>&1
70-
# # Disable error mode for grep
71-
# set +e
72-
# if grep -q Exception "${example}-output.txt"; then
73-
# echo "*** [${this_script}] ${example} failed!"
74-
# cat "${example}-output.txt"
75-
# rm -f "${example}-output.txt"
76-
# exit 1
77-
# fi
78-
# set -e
79-
# rm -f "${example}-output.txt"
80-
#done
65+
echo "*** [${this_script}] Running examples"
66+
pushd examples
67+
for example in $(ls *.php); do
68+
echo "*** [${this_script}] Running ${example} with PHP ${version}"
69+
php ${example} --key ${ROSETTE_API_KEY} > "${example}-output.txt" 2>&1
70+
# Disable error mode for grep
71+
set +e
72+
if grep -q Exception "${example}-output.txt"; then
73+
echo "*** [${this_script}] ${example} failed!"
74+
cat "${example}-output.txt"
75+
rm -f "${example}-output.txt"
76+
exit 1
77+
fi
78+
set -e
79+
rm -f "${example}-output.txt"
80+
done
8181

8282
echo "*** [${this_script}] Finished!"

0 commit comments

Comments
 (0)