forked from sermant-io/Sermant
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (104 loc) · 4.12 KB
/
backend_integration_test.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
name: Backend Integration Test
env:
sermantVersion: 1.0.0
on:
push:
pull_request:
branches:
- '*'
paths:
- 'sermant-agentcore/**'
- 'sermant-backend/**'
- 'sermant-integration-tests/scripts/test_backend*.py'
- '.github/workflows/backend*.yml'
- '.github/actions/scenarios/backend/**'
- '.github/actions/common/backend/action.yml'
- '.github/actions/common/entry/action.yml'
- '.github/actions/common/exit/action.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
download-midwares-and-cache:
name: download midwares and cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache middlewares
uses: actions/cache@v3
with:
path: |
apache-zookeeper-*/
key: ${{ runner.os }}-middlewares-${{ github.run_id }}
- name: download middlewares
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk
tar -zxf apache-zookeeper-3.6.3-bin.tar.gz
- name: cache local cse
uses: actions/cache@v3
with:
path: Local-CSE-2.1.3-linux-amd64.zip
key: ${{ runner.os }}-local-cse
restore-keys: |
${{ runner.os }}-local-cse
- name: download cse
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh cse
- name: cache nacos server
uses: actions/cache@v3
with:
path: nacos-server-2.1.0.tar.gz
key: ${{ runner.os }}-nacos-server-2.1.0
restore-keys: |
${{ runner.os }}-nacos-server-2.1.0
- name: download nacos
run: |
export ROOT_PATH=$(pwd)
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh nacos210
build-agent-and-cache:
name: build agent and cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: cache agent
uses: actions/cache@v3
with:
path: sermant-agent-*/
key: ${{ runner.os }}-agent-${{ github.run_id }}
- name: package agent
run: |
sed -i '/sermant-injector/d' pom.xml
mvn clean package -DskipTests -Ptest --file pom.xml -Dfirst.plugin.paramIndex=1 -Dsecond.plugin.paramIndex=2
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-first-plugin/plugin/dynamic-test-first-plugin-1.0.0.jar ./
mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/dynamic-test-second-plugin/plugin/dynamic-test-second-plugin-1.0.0.jar ./
mvn clean package -DskipTests -Ptest --file pom.xml -Dfirst.plugin.paramIndex=0 -Dsecond.plugin.paramIndex=1
mv ./dynamic-test-first-plugin-1.0.0.jar ./sermant-agent-${{ env.sermantVersion }}
mv ./dynamic-test-second-plugin-1.0.0.jar ./sermant-agent-${{ env.sermantVersion }}
cp ./sermant-integration-tests/agentcore-test/agentcore-test-application/target/agentcore-test-application-1.0.0-jar-with-dependencies.jar sermant-agent-${{ env.sermantVersion }}/agent/
test-for-backend:
name: Test for backend
runs-on: ubuntu-latest
needs: [ build-agent-and-cache, download-midwares-and-cache ]
steps:
- uses: actions/checkout@v2
- name: set java version to environment
run: |
echo "javaVersion=8" >> $GITHUB_ENV
- name: start backend common test
uses: ./.github/actions/common/backend
- name: start backend use memory test
uses: ./.github/actions/scenarios/backend/event/memory
- name: start backend use redis test
uses: ./.github/actions/scenarios/backend/event/redis
- name: start config manager test
uses: ./.github/actions/scenarios/backend/config
- name: start hot plugging test
uses: ./.github/actions/scenarios/backend/hot-plugging