-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 2.13 KB
/
java_11_ci.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
name: JDK11 CI
on:
push:
paths-ignore: [ '**/*.md', '**/*.drawio', '**/*.svg' ]
pull_request:
paths-ignore: [ '**/*.md', '**/*.drawio', '**/*.svg' ]
schedule:
- cron: '0 3 * * *' # automatic test while every day on 03:00 am
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Docker Compose
run: |
docker compose -f ./docker/rtomde/docker-compose.yml up -d
- name: Cache Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Compile
run: ./mvnw -B clean compile install -Dmaven.test.skip=true
- name: Test
run: |
export MAVEN_OPTS='-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:-UseGCOverheadLimit -Xmx2g'
./mvnw -B test -Dmaven.test.skip=false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
- name: Run SonarCloud Analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
./mvnw -B verify sonar:sonar
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
-Dsonar.core.codeCoveragePlugin=jacoco
-Dmaven.test.skip=true
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=flowerfine
-Dsonar.projectKey=flowerfine_indexer
- name: Retry On Error
uses: nick-invision/retry@v1
with:
timeout_minutes: 40
max_attempts: 3
command: ./mvnw -B -ntp clean install -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true