|
Last change
on this file since 31838 was 31834, checked in by floscher, 10 years ago |
|
[mapillary] Let Travis CI send code coverage data to CodeCov
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | language: java
|
|---|
| 2 | cache:
|
|---|
| 3 | directories: $HOME/.gradle
|
|---|
| 4 | jdk:
|
|---|
| 5 | - oraclejdk8
|
|---|
| 6 | - oraclejdk7
|
|---|
| 7 | - openjdk7
|
|---|
| 8 | before_install: pip install --user codecov
|
|---|
| 9 | before_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
|
|---|
| 13 | script: ./gradlew build javadoc
|
|---|
| 14 |
|
|---|
| 15 | # Release the plugin via GitHub releases when pushing a tag
|
|---|
| 16 | before_deploy: 'cp -T build/libs/josm-mapillary-plugin.jar build/libs/Mapillary.jar'
|
|---|
| 17 | deploy:
|
|---|
| 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
|
|---|
| 26 | after_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 |
|
|---|
| 47 | after_success: codecov
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.