-
-
Notifications
You must be signed in to change notification settings - Fork 169
60 lines (58 loc) · 1.82 KB
/
master-docs.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
name: 'Build Documentation & QA'
on:
workflow_run:
workflows: ["master_build"]
branches: [ master ]
types:
- completed
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
jobs:
build_site:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
name: Build Microservice Docs
services:
postgres:
image: openwms/postgres-image:latest
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Cache SonarQube packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Sonar
run: >
./mvnw verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar
-DsurefireArgs="-Dspring.profiles.active=TEST"
-Dsonar.login=$SONAR_TOKEN
-DSONAR_TOKEN=$SONAR_TOKEN
-Dci.buildNumber=$GITHUB_RUN_NUMBER
-Pcoverage -B $MAVEN_OPTS
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}