Skip to content

Commit

Permalink
Unit tests run through Github Action outputs message and errors to st…
Browse files Browse the repository at this point in the history
…andard streams

* Add STDOUT= and STDERR= options to Makefile
* Set these options in Github Action
  • Loading branch information
noresources committed Oct 31, 2024
1 parent af4934b commit b9124e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: make tests
run: make tests STDOUT=/dev/stdout STDERR=/dev/stderr
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# Utility rules to run automation tasks

ARGS :=
ifdef STDERR
ARGS += --stderr $(STDERR)
endif
ifdef STDOUT
ARGS += --stdout $(STDOUT)
endif

.PHONY: all tests parsers-tests php-tests xsh-tests xslt-tests

all: tests

tests: parsers-tests php-tests xsh-tests xslt-tests

parsers-tests:
@tools/sh/run-tests.sh parsers
@echo Parsers
@tools/sh/run-tests.sh parsers $(ARGS)

php-tests:
@tools/sh/run-tests.sh php
@echo PHP
@tools/sh/run-tests.sh php $(ARGS)

xsh-tests:
@tools/sh/run-tests.sh xsh
@echo XSH library
@tools/sh/run-tests.sh xsh $(ARGS)

xslt-tests:
@tools/sh/run-tests.sh xslt
@echo XSLT library
@tools/sh/run-tests.sh xslt $(ARGS)

0 comments on commit b9124e1

Please sign in to comment.