Browse Source

TravisCI: test php.

Andy Li 11 years ago
parent
commit
ac3f737b03
2 changed files with 7 additions and 1 deletions
  1. 3 1
      .travis.yml
  2. 4 0
      tests/unit/RunTravis.hx

+ 3 - 1
.travis.yml

@@ -6,7 +6,7 @@ env:
   # - TARGET=js
   - TARGET=neko
   - TARGET=macro
-  # - TARGET=php
+  - TARGET=php
   # - TARGET=as3
   # - TARGET=cpp
   # - TARGET=java
@@ -14,6 +14,8 @@ env:
 
 matrix:
   fast_finish: true
+  allow_failures:
+    - TARGET=php
 
 before_install:
   - sudo apt-get install ocaml zlib1g-dev libgc-dev -y

+ 4 - 0
tests/unit/RunTravis.hx

@@ -16,6 +16,10 @@ class RunTravis {
 			case "neko":
 				runProcess(new Process("haxe", ["compile-neko.hxml"]));
 				runProcess(new Process("neko", ["unit.n"]));
+			case "php":
+				runProcess(new Process("sudo", ["apt-get", "install", "php", "-y"]));
+				runProcess(new Process("haxe", ["compile-php.hxml"]));
+				runProcess(new Process("php", ["php/index.php"]));
 			case target:
 				throw "unknown target: " + target;
 		}