diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e7e807..4e1a630 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,11 @@ on: [push, pull_request] jobs: test: + defaults: + run: + shell: bash strategy: + fail-fast: false matrix: runner: [windows-latest, ubuntu-latest, macos-13] haxe-version: [latest, 4.3.6] @@ -21,15 +25,26 @@ jobs: - run: | curl -sL https://github.com/massive-oss/mconsole/archive/refs/tags/1.6.1.zip -o mconsole-1.6.1.zip haxelib install mconsole-1.6.1.zip - haxelib install hscript + haxelib install hscript --quiet haxelib install all --quiet --always --skip-dependencies haxelib install minject 2.0.0-rc.1 && haxelib set minject 2.0.0-rc.1 haxelib list - name: install haxelibs + name: Install haxelibs + + - run: | + set -e + haxe test-neko.hxml + neko build/neko_test.n + name: Test neko + + - run: | + set -e + haxe test-php.hxml + php build/php_test.php + name: Test php - run: | - haxe test-neko.hxml && neko build/neko_test.n - haxe test-php.hxml && php build/php_test.php haxe test-js-browser.hxml + name: Test js build diff --git a/src/ufront/test/TestUtils.hx b/src/ufront/test/TestUtils.hx index 37e09ff..1837e39 100644 --- a/src/ufront/test/TestUtils.hx +++ b/src/ufront/test/TestUtils.hx @@ -247,8 +247,8 @@ class TestUtils { if ( args!=null ) { Assert.equals( args.length, ctx.args.length, 'Expected ${args.length} arguments for MVC action, but had ${ctx.args.length}', p ); for ( i in 0...args.length ) { - var expected = args[i]; - var actual = ctx.args[i]; + var expected = Std.string(args[i]); + var actual = Std.string(ctx.args[i]); var recursive = true; Assert.same( expected, actual, recursive, 'Expected argument ${i+1} for MVC action `$action()` to be `$expected`, but was `$actual`', p ); } diff --git a/test-each.hxml b/test-each.hxml index fe2d593..150c2b5 100644 --- a/test-each.hxml +++ b/test-each.hxml @@ -5,6 +5,7 @@ # Things needed for ufront-mvc -lib hx3compat +-lib hx4compat:git:https://github.com/HaxeFoundation/hx4compat -lib compiletime -lib minject -lib tink_core diff --git a/test-php.hxml b/test-php.hxml index 4dd7541..7372ea9 100644 --- a/test-php.hxml +++ b/test-php.hxml @@ -1,6 +1,6 @@ test-each.hxml -php build -D server --D php-lib php --D php-front php_test.php +-D php-lib=php +-D php-front=php_test.php -xml doc/php.xml diff --git a/test/ufront/core/AsyncToolsTest.hx b/test/ufront/core/AsyncToolsTest.hx index 59c5d1a..ea0afa2 100644 --- a/test/ufront/core/AsyncToolsTest.hx +++ b/test/ufront/core/AsyncToolsTest.hx @@ -38,7 +38,7 @@ class AsyncToolsTest { return '$v1$v2$v3'; }); mappedFuture.handle(function(str) { - Assert.equals( 'Hello5Success(Noise)', str ); + Assert.equals(#if (tink_core >= version("2.0.0")) 'Hello5Success(null)' #else 'Hello5Success(Noise)' #end, str); done2(); });