This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
forked from linsolas/casperjs-runner-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
98 lines (89 loc) · 4.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
branches:
only:
- master
language: java
addons:
sonarqube:
token:
secure: "BOEDSMd6XyHxGQRBeM4XWpL3NDEur5gspkRubVkbFf+m2y4ON4Y9AM7cjlAn6W67IVdyCd6bwBuQwS/ExfglIsTFPVpuSMbTqu3nUtajllFRIIb/4xdeK6bGqJWxobOzoag86+nfrxlQb5XFOXFwi9ZFZgSYM7aANGyE/OXXL8A="
cache:
directories:
- $HOME/.m2/repository
- $HOME/.sonar/cache
matrix:
include:
- jdk: "oraclejdk8"
env: BUILD_SITE=true MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz"
- jdk: "openjdk7"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz"
- jdk: "openjdk7"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz"
- jdk: "openjdk7"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz"
- jdk: "openjdk7"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
- jdk: "openjdk7"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz"
- jdk: "oraclejdk8"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz"
- jdk: "oraclejdk8"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz"
- jdk: "oraclejdk8"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz"
- jdk: "oraclejdk8"
env: BUILD_SITE=false MAVEN_URL="http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
before_install:
- wget $MAVEN_URL --output-document=maven.tar.gz
- wget https://github.com/casperjs/phantomjs-builds/archive/v1.8.2.tar.gz -O phantomjs-1.8.2.tar.gz
- wget https://github.com/casperjs/phantomjs-builds/archive/v1.9.8.tar.gz -O phantomjs-1.9.8.tar.gz
- wget https://github.com/casperjs/casperjs/archive/1.0.4.tar.gz -O casperjs-1.0.4.tar.gz
- wget https://github.com/casperjs/casperjs/archive/1.1.3.tar.gz -O casperjs-1.1.3.tar.gz
install:
- mkdir maven && tar --strip-components=1 -zxf maven.tar.gz -C maven
- tar zxf phantomjs-1.8.2.tar.gz
- tar zxf phantomjs-1.9.8.tar.gz
- tar zxf casperjs-1.0.4.tar.gz
- tar zxf casperjs-1.1.3.tar.gz
before_script:
- export PATH=$(pwd)/casperjs-1.1.3/bin:$(pwd)/phantomjs-builds-1.9.8/bin:$(pwd)/maven/bin:$PATH
- echo "export M2_HOME=$(pwd)/maven" > ~/.mavenrc
- echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<toolchains>
<toolchain>
<type>casperjs</type>
<provides> <version>1.0.4</version> </provides>
<configuration><casperjsExecutable>$(pwd)/casperjs-1.0.4/bin/casperjs</casperjsExecutable></configuration>
</toolchain>
<toolchain>
<type>casperjs</type>
<provides> <version>1.1.3</version> </provides>
<configuration><casperjsExecutable>$(pwd)/casperjs-1.1.3/bin/casperjs</casperjsExecutable></configuration>
</toolchain>
</toolchains>" > ~/.m2/toolchains.xml
- sed -e "/<settings>/ a\
<servers>\
<server>\
<id>github</id>\
<password>\${env.GITHUB_OAUTH}</password>\
</server>\
</servers>\
" -e "/<profiles>/ a\
<profile>\
<id>casperjs</id>\
<activation>\
<activeByDefault>true</activeByDefault>\
</activation>\
<properties>\
<casperjs-default-path>$(pwd)/casperjs-1.1.3/bin</casperjs-default-path>\
<phantomjs-for-casper-1.0-path>$(pwd)/phantomjs-builds-1.8.2/bin</phantomjs-for-casper-1.0-path>\
<phantomjs-for-casper-1.1-path>$(pwd)/phantomjs-builds-1.9.8/bin</phantomjs-for-casper-1.1-path>\
</properties>\
</profile>\
" -i ~/.m2/settings.xml
script:
- java -version
- mvn -version
- phantomjs --version
- casperjs --version
- if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "${BUILD_SITE}" = "true" ]; then mvn -Pit,sonar clean install sonar:sonar -Dinvoker.streamLogs=true ; else mvn -Pit install -Dinvoker.streamLogs=true ; fi
- if [ "${TRAVIS_PULL_REQUEST}" = "false" -a "${BUILD_SITE}" = "true" ]; then travis_wait 30 mvn -Psite site-deploy ; fi