source: osm/applications/editors/josm/plugins/mapillary/.travis.yml@ 31821

Last change on this file since 31821 was 31821, checked in by floscher, 9 years ago

[mapillary] Enable xvfb (X Virtual Framebuffer) for Travis CI to run tests that require a GUI

File size: 1.4 KB
Line 
1language: java
2cache:
3 directories: $HOME/.gradle
4jdk:
5 - oraclejdk8
6 - oraclejdk7
7 - openjdk7
8before_script: # init GUI for tests that can't run headless
9 - "export DISPLAY=:99.0"
10 - "sh -e /etc/init.d/xvfb start"
11 - sleep 3
12script: ./gradlew build javadoc
13
14# Release the plugin via GitHub releases when pushing a tag
15before_deploy: 'cp -T build/libs/josm-mapillary-plugin.jar build/libs/Mapillary.jar'
16deploy:
17 provider: releases
18 api_key: "${GH_TOKEN}"
19 file: "build/libs/Mapillary.jar"
20 skip_cleanup: true
21 on:
22 tags: true
23
24#Deploy to GitHub pages
25after_script: |
26 if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
27 git config --global user.email "deploy@travis"
28 git config --global user.name "Travis CI"
29 git remote add deploy "https://floscher:${GH_TOKEN}@github.com/floscher/josm-mapillary-plugin.git"
30 git fetch --depth=1 origin gh-pages:gh-pages
31 git checkout gh-pages
32 git rm -r reports/ docs/
33 mkdir -p reports/ docs/
34 cp -R build/docs/javadoc/ docs/javadoc/
35 cp -R build/reports/tests/ reports/junit/
36 cp -R build/reports/jacoco/ reports/jacoco/
37 cp -R build/reports/findbugs/ reports/findbugs/
38 git stage docs/ reports/
39 masterCommit=`git rev-parse master`
40 git commit -m "Publish developer resources to GitHub pages
41
42 These resources are generated by Travis CI for commit $masterCommit using Gradle."
43 git push deploy gh-pages
44 fi
Note: See TracBrowser for help on using the repository browser.