-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (86 loc) · 2.53 KB
/
ci_pull_request.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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI Pull Requests
on:
pull_request:
branches:
- 'main'
jobs:
package:
runs-on: ubuntu-20.04
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Checkout Code
uses: actions/checkout@v2
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
restore-keys: confapi-plugin
- name: Download Dependencies
run: ./mvnw dependency:go-offline -U -B
- name: Build with Maven
run: ./mvnw package -DskipUnitTests -B
unit-tests:
needs: package
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Checkout Code
uses: actions/checkout@v2
- name: Cache Maven package
uses: actions/cache@v2
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
restore-keys: confapi-plugin
- name: Run Unit Tests and analyze on SonarCloud
run: ./mvnw test sonar:sonar -B
integration-tests:
needs: package
runs-on: ubuntu-20.04
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Checkout Code
uses: actions/checkout@v2
- name: Cache Maven package
uses: actions/cache@v2
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
restore-keys: confapi-plugin
- name: Run Integration Tests
run: ./mvnw integration-test -DskipUnitTests -B
apcc:
needs: package
runs-on: ubuntu-20.04
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Checkout Code
uses: actions/checkout@v2
- name: Cache Maven package
uses: actions/cache@v2
with:
path: ~/.m2
key: confapi-plugin-${{ hashFiles('**/pom.xml') }}
restore-keys: confapi-plugin
- name: Download APCC
run: ./mvnw dependency:get -DgroupId=de.aservo -DartifactId=atlassian-plugin-compatibility-check -Dversion=0.0.4
- name: Copy APCC to current Directory
run: ./mvnw dependency:copy -Dartifact=de.aservo:atlassian-plugin-compatibility-check:0.0.4 -DoutputDirectory=.
- name: Run APCC
run: java -jar atlassian-plugin-compatibility-check-0.0.4.jar "crowd.version"