mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Update travis configuration to run tests in headless chrome
This commit is contained in:
parent
519cd71636
commit
90f61fe87b
27
.travis.yml
27
.travis.yml
|
@ -4,25 +4,38 @@ jdk:
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.m2
|
- $HOME/.m2
|
||||||
|
- $HOME/.node_modules
|
||||||
|
- $HOME/.chromium_dist
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /^release-.+$/
|
- /^release-.+$/
|
||||||
- /^dev-.+/
|
- /^dev-.+/
|
||||||
before_install:
|
before_install:
|
||||||
|
- CHROMIUM_BUILD=466537
|
||||||
|
- mkdir -p $HOME/.chromium_dist/
|
||||||
|
- wget -nc https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F$CHROMIUM_BUILD%2Fchrome-linux.zip?alt=media -O $HOME/.chromium_dist/chromium-$CHROMIUM_BUILD.zip
|
||||||
|
- unzip $HOME/.chromium_dist/chromium-$CHROMIUM_BUILD.zip
|
||||||
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
|
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
|
||||||
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
|
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
|
||||||
- echo "Building version $NEW_VERSION"
|
- echo "Building version $NEW_VERSION"
|
||||||
- mvn versions:set -DnewVersion=$NEW_VERSION
|
- mvn versions:set -DnewVersion=$NEW_VERSION
|
||||||
install:
|
install:
|
||||||
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||||
script: >
|
- pushd tests/src/test/js
|
||||||
mvn -e test \
|
- npm install --prefix $HOME/.node_modules
|
||||||
-Dteavm.junit.target=target/js-tests \
|
- npm run build
|
||||||
-Dteavm.junit.js.runner=htmlunit \
|
- popd
|
||||||
-Dteavm.junit.js.threads=1 \
|
script:
|
||||||
-Dteavm.junit.optimized=true \
|
- mvn -e test -P noHtmlUnit
|
||||||
-Dteavm.junit.minified=true
|
- BASE_PATH=`pwd`
|
||||||
|
- pushd tests/src/test/js
|
||||||
|
- chrome-linux/chrome --headless --remote-debugging-port=9222 --disable-gpu about:blank &
|
||||||
|
- CHROME_PID=$!
|
||||||
|
- node start.js $BASE_PATH/tests/target/js-tests
|
||||||
|
- node start.js $BASE_PATH/html4j/target/js-tests
|
||||||
|
- kill $CHROME_PID
|
||||||
|
- popd
|
||||||
after_success: >
|
after_success: >
|
||||||
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
|
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
|
||||||
export NEW_VERSION
|
export NEW_VERSION
|
||||||
|
|
|
@ -98,7 +98,6 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<systemProperties>
|
<systemProperties>
|
||||||
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
|
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
|
||||||
<teavm.junit.js.runner>htmlunit</teavm.junit.js.runner>
|
|
||||||
<teavm.junit.minified>true</teavm.junit.minified>
|
<teavm.junit.minified>true</teavm.junit.minified>
|
||||||
<teavm.junit.optimized>true</teavm.junit.optimized>
|
<teavm.junit.optimized>true</teavm.junit.optimized>
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
|
|
27
pom.xml
27
pom.xml
|
@ -287,6 +287,33 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>noHtmlUnit</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.16</version>
|
||||||
|
<configuration>
|
||||||
|
<systemProperties>
|
||||||
|
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
|
||||||
|
<teavm.junit.js.runner>htmlunit</teavm.junit.js.runner>
|
||||||
|
<teavm.junit.minified>true</teavm.junit.minified>
|
||||||
|
<teavm.junit.optimized>true</teavm.junit.optimized>
|
||||||
|
</systemProperties>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>all-modules</id>
|
<id>all-modules</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
|
|
@ -86,13 +86,12 @@
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.16</version>
|
<version>2.16</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<argLine>-Xmx512m</argLine>
|
||||||
<systemProperties>
|
<systemProperties>
|
||||||
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
|
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
|
||||||
<teavm.junit.js.runner>htmlunit</teavm.junit.js.runner>
|
|
||||||
<teavm.junit.minified>true</teavm.junit.minified>
|
<teavm.junit.minified>true</teavm.junit.minified>
|
||||||
<teavm.junit.optimized>true</teavm.junit.optimized>
|
<teavm.junit.optimized>true</teavm.junit.optimized>
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
<argLine>-Xmx512m</argLine>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user