This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
94 lines (74 loc) · 2.64 KB
/
pull_request_build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright (c) Bosch Software Innovations GmbH 2018
# Copyright (c) Bosch.IO GmbH 2020-2021
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
#
# SPDX-License-Identifier: EPL-2.0
name: Antenna Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/[email protected]
- name: Cache maven repository
uses: actions/[email protected]
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Setup JDK 11
uses: actions/[email protected]
with:
java-version: 11
- name: Cache sonarcloud
uses: actions/[email protected]
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-sonar-
- name: Setup JDK 1.8
uses: actions/[email protected]
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B clean install -Pcoverage -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Run SCA Analysis
run: mvn verify -DskipTests pmd:pmd checkstyle:checkstyle-aggregate spotbugs:check
- name: Run SonarCloud Analysis
run: mvn sonar:sonar -Dsonar.organization=sw360antenna -Dsonar.projectKey=sw360antenna -Dsonar.host.url=https://sonarcloud.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: "e5dbb8f62a0b8bf02dbbcf4c9fd745c31b63f4b3"
- name: Run Example Project Test with JDK8
run: |
cd example-projects/example-project
mvn -B clean verify
- name: CLI Frontend Test
run: bash .ci-scripts/test-ExampleTestProject-with-CLI.sh
- name: Gradle Frontend Test
run: bash .ci-scripts/test-ExampleTestProject-with-gradle.sh
- name: p2Test
run: bash .ci-scripts/test-p2-end2end.sh
- name: Antenna Documentation Test
run: bash .ci-scripts/test-antenna-documentation-site-tests.sh
- name: Test for License Headers
run: bash .ci-scripts/test-for-licenseHeaders.sh
- name: Setup JDK 11
uses: actions/[email protected]
with:
java-version: 11
- name: Test with JDK 11
run: |
cd example-projects/example-project
mvn -B clean verify -Dmaven.compiler.source=11 -Dmaven.compiler.target=11