-
Notifications
You must be signed in to change notification settings - Fork 58
52 lines (50 loc) · 2 KB
/
push.yaml
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
name: push flow
on:
push:
branches: [ master ]
jobs:
gradle-java8:
name: Java 8 build
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
with:
# bring in all history because the gradle versions plugin needs to "walk back" to the closest ancestor tag
# to figure out what version this is. optimizing this is left as a challenge to future committers
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: create/restore gradle wrapper cache
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: create/restore gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: gradle-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
run: ./gradlew clean build javadoc --stacktrace --warning-mode all --no-daemon --parallel
- name: Generate aggregate coverage report
run: ./gradlew codeCoverageReport --no-daemon
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./build/reports/jacoco/report.xml
- name: Upload coverage to Coveralls
env:
# github actions not supported out-of-the-box (yet?). see https://github.com/kt3k/coveralls-gradle-plugin
CI_NAME: github-actions
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: ./gradlew coveralls --no-daemon
# sonarcloud dropped support for java 8. see https://sonarcloud.io/documentation/appendices/end-of-support/
#
# - name: Run SonarCloud analysis
# env:
# sonar.login: ${{ secrets.SONARCLOUD_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: ./gradlew sonarqube --no-daemon