Tightening the project testing setup

This commit is contained in:
2020-11-17 15:39:00 -07:00
parent c744b82112
commit 376e856993
6 changed files with 27 additions and 4 deletions

View File

@@ -26,8 +26,13 @@ jobs:
haxe: stable
# Test experiments in separate job
- script: KISS_HEADLESS=true ./test-projects.sh
os:
- mac
- linux
- windows
haxe: stable
env:
- KISS_TARGET=projects
install:
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then

View File

@@ -0,0 +1,5 @@
-lib kiss
-cp src
--main Main
--interp

View File

@@ -0,0 +1,6 @@
package;
import kiss.Kiss;
@:build(kiss.Kiss.build("src/Main.kiss"))
class Main {}

View File

@@ -0,0 +1,2 @@
(defun main []
(trace "Hello, project testing!"))

View File

@@ -1,3 +1,4 @@
#! /bin/bash
exit 0
haxelib dev kiss ../../
haxe build.hxml

View File

@@ -4,11 +4,15 @@ PROJECT_DIRS=projects/**/
for PROJECT_DIR in $PROJECT_DIRS
do
if [ ! -z "${TRAVIS_OS_NAME}" ]; then
(cd $PROJECT_DIR && haxelib install all)
fi
AUTO_TEST_FILE=${PROJECT_DIR}test.sh
if [ -e $AUTO_TEST_FILE ]
then
echo $AUTO_TEST_FILE
$AUTO_TEST_FILE
(cd $PROJECT_DIR && ./test.sh)
if [ ! $? -eq 0 ]
then
echo "failed"
@@ -20,7 +24,7 @@ do
if [ -z "$KISS_HEADLESS" ] && [ -e $MANUAL_TEST_FILE ]
then
echo $MANUAL_TEST_FILE
$MANUAL_TEST_FILE
(cd $PROJECT_DIR && ./manual-test.sh)
if [ ! $? -eq 0 ]
then
echo "failed"