Skip to content

Commit

Permalink
Go
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Dec 1, 2024
1 parent 684a883 commit e60d235
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/jobs/unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,20 @@ UNITSUCCESS=$?
touch ${DIR}/webapp/var/log/test.log
cp ${DIR}/webapp/var/log/test.log "$ARTIFACTS"/test.log

exit 0

set -e
CNT=0
THRESHOLD=32
if [ $CODECOVERAGE -eq 1 ]; then
CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
fi

# Make sure the log exists before copy
touch ${DIR}/webapp/var/log/test.log
cp ${DIR}/webapp/var/log/test.log "$ARTIFACTS"/test.log

if [ $UNITSUCCESS -ne 0 ] || [ $CNT -gt $THRESHOLD ]; then
exit 1
fi

#set -e
#CNT=0
#THRESHOLD=32
#if [ $CODECOVERAGE -eq 1 ]; then
# CNT=$(sed -n '/Generating code coverage report/,$p' "$ARTIFACTS"/phpunit.out | grep -v DoctrineTestBundle | grep -cv ^$)
# if [ $CNT -gt $THRESHOLD ]; then
# UNITSUCCESS=1
# fi
#fi
#
#if [ $UNITSUCCESS -ne 0 ] || [ $CNT -gt $THRESHOLD ]; then
# exit 1
#fi
#
if [ $CODECOVERAGE -eq 1 ]; then
section_start "Upload code coverage"
# Only upload when we got working unit-tests.
Expand Down

0 comments on commit e60d235

Please sign in to comment.