Fix node.js version in travis. Fix htmlUnit profile in maven

This commit is contained in:
Alexey Andreev 2017-04-22 12:13:51 +03:00
parent 790f4e9eee
commit c7f0749671
3 changed files with 23 additions and 23 deletions

View File

@ -1,6 +1,7 @@
language: java language: java
jdk: jdk:
- oraclejdk8 - oraclejdk8
cache: cache:
directories: directories:
- $HOME/.m2 - $HOME/.m2
@ -11,15 +12,18 @@ branches:
- master - master
- /^release-.+$/ - /^release-.+$/
- /^dev-.+/ - /^dev-.+/
before_install: before_install:
- nvm install 7
- CHROMIUM_BUILD=466537 - CHROMIUM_BUILD=466537
- mkdir -p $HOME/.chromium_dist/ - 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 - 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 - unzip -q $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
- pushd tests/src/test/js - pushd tests/src/test/js
@ -27,8 +31,9 @@ install:
- npm install - npm install
- npm run build - npm run build
- popd - popd
script: script:
- mvn -e test -P noHtmlUnit - mvn -e test -P \!htmlUnit
- BASE_PATH=`pwd` - BASE_PATH=`pwd`
- pushd tests/src/test/js - pushd tests/src/test/js
- chrome-linux/chrome --headless --remote-debugging-port=9222 --disable-gpu about:blank & - chrome-linux/chrome --headless --remote-debugging-port=9222 --disable-gpu about:blank &
@ -37,6 +42,7 @@ script:
- node start.js $BASE_PATH/html4j/target/js-tests - node start.js $BASE_PATH/html4j/target/js-tests
- kill $CHROME_PID - kill $CHROME_PID
- popd - 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

View File

@ -88,23 +88,20 @@
<configLocation>../checkstyle.xml</configLocation> <configLocation>../checkstyle.xml</configLocation>
</configuration> </configuration>
</plugin> </plugin>
<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.minified>true</teavm.junit.minified>
<teavm.junit.optimized>true</teavm.junit.optimized>
</systemProperties>
<argLine>-Xmx512m</argLine>
</configuration>
</plugin>
</plugins> </plugins>
<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.minified>true</teavm.junit.minified>
<teavm.junit.optimized>true</teavm.junit.optimized>
</systemProperties>
<argLine>-Xmx512m</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build> </build>
</project> </project>

View File

@ -288,7 +288,7 @@
<profiles> <profiles>
<profile> <profile>
<id>noHtmlUnit</id> <id>htmlUnit</id>
<activation> <activation>
<activeByDefault>true</activeByDefault> <activeByDefault>true</activeByDefault>
</activation> </activation>
@ -302,10 +302,7 @@
<version>2.16</version> <version>2.16</version>
<configuration> <configuration>
<systemProperties> <systemProperties>
<teavm.junit.target>${project.build.directory}/js-tests</teavm.junit.target>
<teavm.junit.js.runner>htmlunit</teavm.junit.js.runner> <teavm.junit.js.runner>htmlunit</teavm.junit.js.runner>
<teavm.junit.minified>true</teavm.junit.minified>
<teavm.junit.optimized>true</teavm.junit.optimized>
</systemProperties> </systemProperties>
</configuration> </configuration>
</plugin> </plugin>