Skip to content

Commit a0e0284

Browse files
committed
ci: trick github log parser using ::group:: and ::endgroup::
1 parent b00103c commit a0e0284

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/packages.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -92,40 +92,44 @@ jobs:
9292
-DUnitTest.FailuresAreFatal=1 -DUnitTest.Manager=%UnitTest.Manager
9393
run: |
9494
# Don't specify the container name because `act` will run multiple jobs in parallel and cause name conflicts
95-
echo "starting sequential tests ..."
9695
packages=${{ matrix.packages }}
9796
IFS=','
97+
RED='\033[0;31m'
98+
GREEN='\033[0;32m'
99+
NC='\033[0m'
98100
99101
# The EOF of the following heredocs are intentially unindented
100102
# because <<-EOF doesn't like spaces while yaml only allows spaces
101103
# A potential solution is to use a script file instead of a block
102104
for package in $packages; do
103-
echo "setting up container for package $package"
105+
echo "::group::Set up container for package $package"
104106
CONTAINER=$(docker run -d --rm -v `pwd`:/home/irisowner/zpm/ zpm)
105107
docker exec $CONTAINER /usr/irissys/dev/Cloud/ICM/waitISC.sh
106108
docker exec -i $CONTAINER iris session IRIS <<- EOF
107109
zpm "config set analytics 0":1
108110
zpm "repo -r -name registry -url https://pm.community.intersystems.com/":1
109111
halt
110112
EOF
113+
echo "::endgroup::"
111114
112-
echo "Testing package $package"
115+
echo "::group::Test package $package"
113116
set +e
114117
docker exec -i $CONTAINER iris session IRIS <<- EOF
115118
zpm "install $package":1
116119
zpm "$package test -only ${{ env.test-flags }}":1:1
117120
EOF
118121
119122
if [ $? -ne 0 ]; then
120-
echo -e "\nTest for package $package failed" >&2
123+
echo -e "\n${RED}Test for package $package failed${NC}" >&2
121124
else
122-
echo -e "\nTest for package $package passed"
125+
echo -e "\n${GREEN}Test for package $package passed${NC}"
123126
fi
124-
125-
echo "Cleaning up container for package $package"
127+
echo "::endgroup::"
128+
129+
echo "::group::Clean up container for $package"
126130
# To ensure a clean state after using `act` locally
127131
docker stop -t 5 $CONTAINER
132+
echo "::endgroup::"
128133
done
129134
130135
IFS=' '
131-
echo "ending sequential tests ..."

0 commit comments

Comments
 (0)