forked from apache/shardingsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (146 loc) · 6.38 KB
/
e2e-pipeline.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
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: E2E - Pipeline
on:
push:
branches: [ master, dev ]
paths:
- '.github/workflows/e2e-pipeline.yml'
- 'infra/**/src/main/**'
- 'mode/**/src/main/**'
- 'features/encrypt/src/main/**'
- 'features/features/readwrite-splitting/src/main/**'
- 'features/sharding/src/main/**'
- 'proxy/**/src/main/**'
- 'jdbc/core/src/main/**'
- '**/*-distsql*/**/src/main/**'
- 'kernel/data-pipeline/**/src/main/**'
- 'kernel/data-pipeline/**/pom.xml'
- '**/src/main/**/data/pipeline/**'
- '**/src/main/resources/META-INF/services/*.data.pipeline.*'
- '!test/**'
- 'test/pom.xml'
- 'test/e2e/fixture/**'
- 'test/e2e/env/**'
- 'test/e2e/operation/pipeline/**'
- '!*.md'
pull_request:
branches: [ master ]
paths:
- '.github/workflows/e2e-pipeline.yml'
- 'infra/**/src/main/**'
- 'mode/**/src/main/**'
- 'features/encrypt/src/main/**'
- 'features/features/readwrite-splitting/src/main/**'
- 'features/sharding/src/main/**'
- 'proxy/**/src/main/**'
- 'jdbc/core/src/main/**'
- '**/*-distsql*/**/src/main/**'
- 'kernel/data-pipeline/**/src/main/**'
- 'kernel/data-pipeline/**/pom.xml'
- '**/src/main/**/data/pipeline/**'
- '**/src/main/resources/META-INF/services/*.data.pipeline.*'
- '!test/**'
- 'test/pom.xml'
- 'test/e2e/fixture/**'
- 'test/e2e/env/**'
- 'test/e2e/operation/pipeline/**'
- '!*.md'
schedule:
- cron: '0 22 */1 * *' # once a day. UTC time
workflow_dispatch:
concurrency:
group: e2e-pipeline-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true -Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
REPOSITORY_NAME: shardingsphere
jobs:
pipeline:
if: (github.event_name != 'schedule')
name: E2E - Pipeline
runs-on: ubuntu-latest
env:
postgresql_version: postgres:12-alpine
mysql_version: mysql:5.7
opengauss_version: enmotech/opengauss:2.1.0
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- name: Cache Maven Repos
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
${{ env.REPOSITORY_NAME }}-maven-third-party-e2e-cache-
${{ env.REPOSITORY_NAME }}-maven-third-party-
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Build Pipeline E2E image
run: ./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
- name: Setup JDK 8 for Test
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Run Pipeline MySQL E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=${{ env.mysql_version }}
- name: Run Pipeline PostgreSQL E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.postgresql.version=${{ env.postgresql_version }}
- name: Run Pipeline openGauss E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.opengauss.version=${{ env.opengauss_version }}
daily-pipeline:
if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
name: Nightly - E2E - Pipeline
runs-on: ubuntu-latest
env:
postgresql_version: postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine
mysql_version: mysql:5.7,mysql:8.0
opengauss_version: enmotech/opengauss:2.1.0,enmotech/opengauss:3.0.0
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Cache Maven Repos
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
${{ env.REPOSITORY_NAME }}-maven-third-party-e2e-cache-
${{ env.REPOSITORY_NAME }}-maven-third-party-
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Build Pipeline E2E image
run: ./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
- name: Setup JDK 8 for Test
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Run Pipeline Daily MySQL E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=${{ env.mysql_version }}
- name: Run Pipeline Daily PostgreSQL E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.postgresql.version=${{ env.postgresql_version }}
- name: Run Pipeline Daily openGauss E2E Test
run: ./mvnw -nsu -B install -f test/e2e/operation/pipeline/pom.xml -Dpipeline.it.env.type=docker -Dpipeline.it.docker.opengauss.version=${{ env.opengauss_version }}