Github Actions run unit tests. [ci skip]
This commit is contained in:
parent
7d9d3357cf
commit
7a90b3a134
1 changed files with 28 additions and 0 deletions
28
.github/workflows/ci-scripts/docker.sh
vendored
28
.github/workflows/ci-scripts/docker.sh
vendored
|
@ -6,3 +6,31 @@ scons wesnoth wesnothd campaignd boost_unit_tests build=release \
|
|||
nls=false enable_lto=true sanitize="" jobs=2 --debug=time
|
||||
|
||||
ls -Al
|
||||
|
||||
# print given message ($1) and execute given command; sets EXIT_VAL on failure
|
||||
execute() {
|
||||
local message=$1; shift
|
||||
printf 'Executing %s\n' "$message"
|
||||
if "$@"; then
|
||||
: # success
|
||||
else
|
||||
EXIT_VAL=$?
|
||||
error "$message failed! ($*)"
|
||||
fi
|
||||
}
|
||||
|
||||
checkindent() {
|
||||
make -C data/tools reindent &&
|
||||
git diff-index --quiet HEAD
|
||||
}
|
||||
|
||||
execute "WML validation" ./utils/travis/schema_validation.sh
|
||||
execute "WML indentation check" checkindent
|
||||
execute "WML tests" ./run_wml_tests -g -v -c -t "$WML_TEST_TIME"
|
||||
execute "Play tests" ./utils/travis/play_test_executor.sh
|
||||
execute "Boost unit tests" ./utils/travis/test_executor.sh
|
||||
|
||||
if [ -f "errors.log" ]; then
|
||||
error $'\n*** \n*\n* Errors reported in wml unit tests, here is errors.log...\n*\n*** \n'
|
||||
cat errors.log
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue