Repository navigation
157 lines (149 loc) · 6.31 KB
/
Copy pathnightly-e2e-sql.yml
File metadata and controls
157 lines (149 loc) · 6.31 KB
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
#
# 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: Nightly - E2E SQL
on:
schedule:
- cron: '0 15 * * 1-5' # Once a day between Monday and Friday. UTC time
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
MAVEN_ARGS: -B -ntp -fae -e
MAVEN_OPTS: -Dhttp.keepAlive=false
MAVEN_REPOSITORY_DIR: ../.e2e-maven/repository
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
jobs:
global-environment:
name: Import Global Environment
uses: ./.github/workflows/reusable-global-environment.yml
prepare-e2e-artifacts:
name: Prepare E2E Artifacts
needs: global-environment
if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
timeout-minutes: 40
outputs:
artifact-id: ${{ steps.upload-e2e-artifacts.outputs.artifact-id }}
steps:
- uses: actions/checkout@v7.0.1
- id: setup-build-environment
uses: ./.github/actions/setup-build-environment
with:
java-version: 21
maven-repository-dir: ${{ env.MAVEN_REPOSITORY_DIR }}
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- name: Restore E2E Image Cache
id: prepare-image
uses: ./.github/actions/prepare-e2e-docker
with:
type: source
image: apache/shardingsphere-proxy-test
- name: Build E2E Image
run: ./mvnw -Dmaven.repo.local="$E2E_MAVEN_REPOSITORY" clean install -am -pl test/e2e/sql -Pe2e.env.docker -DskipTests -Ddocker.image.name="${{ steps.prepare-image.outputs.image }}" -Dexec.skip=${{ steps.prepare-image.outputs.cache-hit == 'true' }}
- name: Save E2E Image Cache
if: steps.prepare-image.outputs.cache-hit != 'true'
uses: ./.github/actions/prepare-e2e-docker
with:
type: source
operation: save
image: ${{ steps.prepare-image.outputs.image }}
- uses: ./.github/actions/save-maven-cache
with:
maven-repository-dir: ${{ env.MAVEN_REPOSITORY_DIR }}
cache-hit: ${{ steps.setup-build-environment.outputs.cache-hit }}
cache-primary-key: ${{ steps.setup-build-environment.outputs.cache-primary-key }}
- id: upload-e2e-artifacts
uses: ./.github/actions/upload-e2e-artifacts
with:
maven-repository-dir: ${{ env.MAVEN_REPOSITORY_DIR }}
image-archive: ${{ steps.prepare-image.outputs.archive }}
e2e-sql:
name: E2E - SQL
needs: [ prepare-e2e-artifacts, global-environment ]
if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
timeout-minutes: 200
strategy:
max-parallel: 15
fail-fast: false
matrix:
adapter: [ proxy, jdbc ]
mode: [ Standalone, Cluster ]
database: [ MySQL, PostgreSQL, openGauss ]
scenario: [ empty_rules, distsql_rdl, passthrough, db, tbl, encrypt, readwrite_splitting, shadow, mask, dbtbl_with_readwrite_splitting, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding, db_tbl_sql_federation ]
additional-options: [ '' ]
include:
- adapter: proxy
mode: Cluster
database: MySQL
scenario: passthrough
additional-options: '-Dmysql-connector-java.version=8.4.0'
- adapter: jdbc
mode: Standalone
database: Hive
scenario: encrypt
- adapter: jdbc
mode: Standalone
database: Hive
scenario: mask
- adapter: proxy
mode: Cluster
database: Firebird
scenario: db
exclude:
- adapter: jdbc
scenario: passthrough
- adapter: jdbc
mode: Cluster
- adapter: proxy
mode: Standalone
scenario: empty_rules
- adapter: proxy
mode: Standalone
scenario: distsql_rdl
- adapter: proxy
mode: Standalone
scenario: passthrough
steps:
- name: Logs
run: |
echo "runner.temp=${{ runner.temp }}"
echo "RUNNER_TEMP=$RUNNER_TEMP"
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
- uses: actions/checkout@v7.0.1
with:
ref: ${{ github.sha }}
- uses: ./.github/actions/setup-build-environment
with:
maven-repository-dir: ${{ env.MAVEN_REPOSITORY_DIR }}
java-version: 21
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- id: download-e2e-artifacts
uses: ./.github/actions/download-e2e-artifacts
with:
maven-repository-dir: ${{ env.MAVEN_REPOSITORY_DIR }}
artifact-id: ${{ needs.prepare-e2e-artifacts.outputs.artifact-id }}
load-docker-image: ${{ matrix.adapter == 'proxy' }}
- name: Run E2E Test
run: ./mvnw -Dmaven.repo.local="$E2E_MAVEN_REPOSITORY" -nsu install -f test/e2e/sql/pom.xml -De2e.run.type=DOCKER -De2e.artifact.modes=${{ matrix.mode }} -De2e.artifact.adapters=${{ matrix.adapter }} -De2e.run.additional.cases=false -De2e.scenarios=${{ matrix.scenario }} -De2e.artifact.databases=${{ matrix.database }} ${{ matrix.additional-options }} -De2e.docker.proxy.image="${{ steps.download-e2e-artifacts.outputs.image }}"