-
Notifications
You must be signed in to change notification settings - Fork 625
169 lines (164 loc) · 5.62 KB
/
main-forks.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: API Manager Build with Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
concurrency:
group: ${{ github.event.number }}
cancel-in-progress: true
jobs:
build-carbon:
runs-on: ubuntu-latest
steps:
- name: Run hostname
run: hostname
- name: Fix host entry
run: sudo echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts
- name: Show hosts
run: cat /etc/hosts
- name: Checkout master
uses: actions/checkout@v3
with:
fetch-depth: '10'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11.0.16+8
distribution: 'temurin'
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Build carbon-apimgt with Tests, skipping AspectJ
run: mvn clean install --file pom.xml -Dskip.aspectj=true
- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: unit_tests
build-product:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- id: 1
segment: group1
- id: 2
segment: group2
fail-fast: false
steps:
- name: Run hostname
run: hostname
- name: Fix host entry
run: sudo echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts
- name: Show hosts
run: cat /etc/hosts
- name: Checkout master
uses: actions/checkout@v3
with:
fetch-depth: '10'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11.0.16+8
distribution: 'temurin'
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Cache maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Build carbon-apimgt without tests, skip AspectJ, skip portal builds
run: mvn clean install --file pom.xml -Dmaven.test.skip=true -Dskip.aspectj=true -Dnpm.build.skip=true
- name: Get carbon.apimgt.version
run: mvn help:evaluate -Dexpression=project.version -q -DforceStdout > ../CARBON_APIMGT_VERSION_FILE
- name: Print carbon.apimgt.version
run: |
echo $(cat ../CARBON_APIMGT_VERSION_FILE)
- name: Checkout Product-APIM
uses: actions/checkout@v3
with:
repository: shilmyhasan/product-apim-1
ref: refs/heads/master-testnew
fetch-depth: '10'
path: product-apim
- name: Build product-apim with tests
run: mvn clean install -Dcarbon.apimgt.version=$(cat ../CARBON_APIMGT_VERSION_FILE) -fae --file product-apim/pom.xml -DskipBenchMarkTest=true -DskipRestartTests=true
env:
PRODUCT_APIM_TEST_GROUPS: ${{ matrix.segment }}
- name: Publish Test Report
if: always()
uses: malinthaprasan/action-surefire-report@v1
with:
report_paths: 'product-apim/modules/integration/tests-integration/tests-backend/target/surefire-reports/TEST-TestSuite.xml'
- name: Prepare upload testng report
if: always()
run: mv product-apim/modules/integration/tests-integration/tests-backend/target/surefire-reports/TEST-TestSuite.xml TEST-TestSuite_${{ matrix.id }}.xml
- name: Archive testng report
if: always()
uses: actions/upload-artifact@v2
with:
name: TEST-TestSuite_${{ matrix.id }}
path: |
TEST-TestSuite_${{ matrix.id }}.xml
if-no-files-found: warn
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: integration_tests
run-benchmark-test:
runs-on: ubuntu-latest
steps:
- name: Run hostname
run: hostname
- name: Fix host entry
run: sudo echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts
- name: Show hosts
run: cat /etc/hosts
- name: Checkout master
uses: actions/checkout@v3
with:
fetch-depth: '10'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11.0.16+8
distribution: 'temurin'
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Cache maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2
restore-keys: ${{ runner.os }}-m2
- name: Build carbon-apimgt without tests, skip AspectJ, skip portal builds
run: mvn clean install --file pom.xml -Dmaven.test.skip=true -Dskip.aspectj=true -Dnpm.build.skip=true
- name: Get carbon.apimgt.version
run: mvn help:evaluate -Dexpression=project.version -q -DforceStdout > ../CARBON_APIMGT_VERSION_FILE
- name: Print carbon.apimgt.version
run: |
echo $(cat ../CARBON_APIMGT_VERSION_FILE)
- name: Checkout Product-APIM
uses: actions/checkout@v3
with:
repository: shilmyhasan/product-apim-1
ref: refs/heads/master-testnew
fetch-depth: '10'
path: product-apim
- name: Build product-apim with tests
run: mvn clean install -Dcarbon.apimgt.version=$(cat ../CARBON_APIMGT_VERSION_FILE) -fae --file product-apim/pom.xml -DskipIntegrationTests