Skip to content

Commit fef6a52

Browse files
author
Vicente Herrera
committed
feat: Added test in Makefile for GitHub action workflows
1 parent d2dc07a commit fef6a52

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,21 @@ check-dotnet:
114114

115115
# -----------------------------------------------------------------------------
116116

117+
build: forwarder-build
118+
119+
# -----------------------------------------------------------------------------
120+
117121
test-gh-actions:
118122
@if [ -z "$$(command -v act)" ]; then echo "Requires act command installed" ; exit -1 ; fi
119-
act workflow_dispatch -n -e ./test/test-gh-event.json
123+
@bash -c "act release -n -e ./test/test-gh-event.json 2> >(tee /tmp/gh-actions-errors.log >&2)" ; \
124+
if [ -s /tmp/gh-actions-errors.log ]; then \
125+
cat /tmp/gh-actions-errors.log ; \
126+
echo "> Errors found"; \
127+
exit -1; \
128+
fi ; \
129+
echo "> No errors on release event workflows"
130+
131+
all-tests: check build test-gh-actions
120132

121133
# -----------------------------------------------------------------------------
122134

0 commit comments

Comments
 (0)