Failing travis test matrix

This commit is contained in:
2020-11-12 19:01:57 -07:00
parent 670f22ad5a
commit 232f3870e5
14 changed files with 94 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
bin/

38
.travis.yml Normal file
View File

@@ -0,0 +1,38 @@
language: haxe
dist: xenial
os:
- mac
- linux
- windows
haxe:
- stable
- development
env:
- HISS_TARGET=cpp
- HISS_TARGET=interp
- HISS_TARGET=js
- HISS_TARGET=nodejs
- HISS_TARGET=py3
jobs:
# Allow Haxe development to fail.
allow_failures:
- haxe: development
fast_finish: true
# Check the formatting in a separate job so formatting failures don't hide more important ones
include:
- script: haxelib install formatter && haxelib run formatter --check -s .
os: linux
haxe: stable
install:
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
choco install nodejs-lts --version 12.13.1 -y; export PATH="/c/Program Files/nodejs:$PATH";
choco install python --version 3.7.1 -y; export PATH="/c/Python37/Scripts:/c/Python37:$PATH";
fi
# Magic to make haxelib works https://github.com/HaxeFoundation/neko/issues/196
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
curl -sSLf https://lib.haxe.org/p/jQueryExtern/3.2.1/download/ -o /dev/null;
fi
script: ./test-travis.sh

View File

@@ -0,0 +1,2 @@
-cp src
-D analyzer-optimize

View File

@@ -0,0 +1,3 @@
src/build-scripts/common-args.hxml
-lib utest
--main test.TestMain

View File

@@ -0,0 +1,3 @@
src/build-scripts/common-test-args.hxml
-cpp bin/cpp/test
-cmd bash src/build-scripts/test/cpp.sh

View File

@@ -0,0 +1,2 @@
#! /bin/bash
./bin/cpp/test/TestMain

View File

@@ -0,0 +1,2 @@
src/build-scripts/common-test-args.hxml
--interp

View File

@@ -0,0 +1,3 @@
src/build-scripts/common-test-args.hxml
--js bin/js/test.js
--cmd node bin/js/test.js

View File

@@ -0,0 +1,4 @@
src/build-scripts/common-test-args.hxml
-lib hxnodejs
--js bin/nodejs/test.js
--cmd node bin/nodejs/test.js

View File

@@ -0,0 +1,3 @@
src/build-scripts/common-test-args.hxml
--python bin/py/test.py
--cmd bash src/build-scripts/test/py.sh

View File

@@ -0,0 +1,8 @@
#! /bin/bash
# Travis testing on Xenial
if [ "$(uname)" = "Linux" ]; then
python3 bin/py/test.py
else
python bin/py/test.py
fi

13
src/test/TestMain.hx Normal file
View File

@@ -0,0 +1,13 @@
package test;
import utest.Runner;
import utest.ui.Report;
class TestMain {
public static function main() {
var runner = new Runner();
runner.addCases(test.cases);
Report.create(runner);
runner.run();
}
}

10
test-all.sh Normal file
View File

@@ -0,0 +1,10 @@
#! /bin/bash
TEST_FILES=src/build-scripts/test/*.hxml
for TEST_FILE in $TEST_FILES
do
haxe $TEST_FILE
if [ ! $? -eq 0 ]
then
exit $?
fi
done

2
test.sh Normal file
View File

@@ -0,0 +1,2 @@
#! /bin/bash
haxe src/build-scripts/test/$1.hxml