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

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

[mapillary] Let Travis CI send code coverage data to CodeCov

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