Skip to content

Commit be5c4e2

Browse files
committed
[test] Reduce the number of tests triggered by each CI
1 parent 37dc315 commit be5c4e2

File tree

5 files changed

+33
-100
lines changed

5 files changed

+33
-100
lines changed

.github/workflows/e2e-tests-flink-1.x-jdk11.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/e2e-tests-flink-1.x.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
strategy:
4444
fail-fast: true
4545
matrix:
46-
# Last element should be the current default flink version
47-
flink_version: [ '1.16', '1.17', '1.18', '1.19', '1.20' ]
46+
# Only Test Latest Version
47+
flink_version: [ '1.20' ]
4848
steps:
4949
- name: Checkout code
5050
uses: actions/checkout@v4

.github/workflows/e2e-tests-flink-2.x-jdk11.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
strategy:
4040
fail-fast: true
4141
matrix:
42-
# Last element should be the current default flink version
43-
flink_version: [ '2.0', '2.1', '2.2' ]
42+
# Only Test Latest Version
43+
flink_version: [ '2.2' ]
4444
steps:
4545
- name: Checkout code
4646
uses: actions/checkout@v4

.github/workflows/utitcase-flink-1.x.yml renamed to .github/workflows/utitcase-flink-1.x-common.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
################################################################################
18-
name: UTCase and ITCase Flink 1.x
18+
name: UTCase and ITCase Flink 1.x Common
1919

2020
on:
2121
push:
@@ -39,10 +39,6 @@ jobs:
3939
build_test:
4040
runs-on: ubuntu-latest
4141
timeout-minutes: 60
42-
strategy:
43-
fail-fast: true
44-
matrix:
45-
flink_version: ['common', 'cdc', '1.16', '1.17', '1.18', '1.19', '1.20']
4642

4743
steps:
4844
- name: Checkout code
@@ -56,7 +52,7 @@ jobs:
5652

5753
- name: Build Flink
5854
run: |
59-
COMPILE_MODULE="org.apache.paimon:paimon-flink-${{ matrix.flink_version }}"
55+
COMPILE_MODULE="org.apache.paimon:paimon-flink-common"
6056
echo "Start compiling modules: $COMPILE_MODULE"
6157
mvn -T 2C -B clean install -DskipTests -Pflink1,spark3 -pl "${COMPILE_MODULE}" -am
6258
@@ -65,7 +61,7 @@ jobs:
6561
. .github/workflows/utils.sh
6662
jvm_timezone=$(random_timezone)
6763
echo "JVM timezone is set to $jvm_timezone"
68-
TEST_MODULE="org.apache.paimon:paimon-flink-${{ matrix.flink_version }}"
64+
TEST_MODULE="org.apache.paimon:paimon-flink-common"
6965
echo "Start testing module: $TEST_MODULE"
7066
mvn -T 2C -B test verify -Pflink1,spark3 -pl "${TEST_MODULE}" -Duser.timezone=$jvm_timezone
7167
echo "All modules tested"

.github/workflows/utitcase-flink-1.x-jdk11.yml renamed to .github/workflows/utitcase-flink-1.x-others.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,57 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
################################################################################
18-
19-
name: UTCase and ITCase Flink 1.x on JDK 11
18+
name: UTCase and ITCase Flink 1.x Others
2019

2120
on:
22-
issue_comment:
23-
types: [created, edited, deleted]
24-
25-
# daily run
26-
schedule:
27-
- cron: "0 0 * * *"
21+
push:
22+
pull_request:
23+
paths-ignore:
24+
- 'docs/**'
25+
- '**/*.md'
26+
- 'paimon-python/**'
27+
- '.github/workflows/paimon-python-checks.yml'
28+
- 'paimon-lucene/**'
2829

2930
env:
30-
JDK_VERSION: 11
31+
JDK_VERSION: 8
3132
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true
3233

34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
36+
cancel-in-progress: true
37+
3338
jobs:
34-
build:
35-
if: |
36-
github.event_name == 'schedule' ||
37-
(contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/jdk11'))
39+
build_test:
3840
runs-on: ubuntu-latest
41+
timeout-minutes: 60
3942

4043
steps:
4144
- name: Checkout code
4245
uses: actions/checkout@v4
46+
4347
- name: Set up JDK ${{ env.JDK_VERSION }}
4448
uses: actions/setup-java@v4
4549
with:
4650
java-version: ${{ env.JDK_VERSION }}
4751
distribution: 'temurin'
52+
4853
- name: Build Flink
49-
run: mvn -T 1C -B clean install -DskipTests -Pflink1,spark3
54+
run: |
55+
COMPILE_MODULE="org.apache.paimon:paimon-flink-${{ matrix.flink_version }}"
56+
echo "Start compiling modules: $COMPILE_MODULE"
57+
mvn -T 2C -B clean install -DskipTests -Pflink1,spark3 -pl "${COMPILE_MODULE}" -am
58+
5059
- name: Test Flink
5160
run: |
52-
# run tests with random timezone to find out timezone related bugs
5361
. .github/workflows/utils.sh
5462
jvm_timezone=$(random_timezone)
5563
echo "JVM timezone is set to $jvm_timezone"
5664
test_modules=""
57-
for suffix in 1.16 1.17 1.18 1.19 1.20 common; do
65+
for suffix in cdc 1.16 1.17 1.18 1.19 1.20 2.2; do
5866
test_modules+="org.apache.paimon:paimon-flink-${suffix},"
5967
done
6068
test_modules="${test_modules%,}"
61-
mvn -T 1C -B test verify -Pflink1,spark3 -pl "${test_modules}" -Duser.timezone=$jvm_timezone
69+
mvn -T 2C -B test verify -Pflink1,spark3 -pl "${test_modules}" -Duser.timezone=$jvm_timezone
6270
env:
63-
MAVEN_OPTS: -Xmx4096m
71+
MAVEN_OPTS: -Xmx4096m -XX:+UseG1GC -XX:CICompilerCount=2

0 commit comments

Comments
 (0)