[ci] Run affected test suites through reusable workflows (#9787) · apache/paimon@301d7b3 · GitHub
Skip to content

Commit 301d7b3

Browse files
authored
[ci] Run affected test suites through reusable workflows (#9787)
1 parent bfd6abc commit 301d7b3

32 files changed

Lines changed: 1051 additions & 999 deletions

‎.github/CI.md‎

Lines changed: 83 additions & 0 deletions
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
name: docs-tests
16+
name: CI / Documentation
17+
1718
on:
18-
push:
19-
pull_request:
20-
paths:
21-
- 'docs/**'
19+
workflow_call:
2220

23-
concurrency:
24-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
25-
cancel-in-progress: true
21+
permissions:
22+
contents: read
2623

2724
jobs:
2825
build:
@@ -31,7 +28,7 @@ jobs:
3128

3229
steps:
3330
- name: Checkout code
34-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3532

3633
- name: Setup Node.js
3734
uses: actions/setup-node@v4

‎.github/workflows/ci-java.yml‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
19+
name: CI / Java
20+
21+
on:
22+
workflow_call:
23+
inputs:
24+
matrix:
25+
description: Java suites selected by tools/ci/plan.py
26+
required: true
27+
type: string
28+
29+
permissions:
30+
contents: read
31+
32+
env:
33+
MAVEN_OPTS: -Xmx4096m -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true
34+
35+
jobs:
36+
test:
37+
name: ${{ matrix.name }}
38+
runs-on: ubuntu-latest
39+
timeout-minutes: ${{ matrix.timeout }}
40+
strategy:
41+
# Keep independent results when one engine fails.
42+
fail-fast: false
43+
matrix: ${{ fromJSON(inputs.matrix) }}
44+
steps:
45+
- uses: actions/checkout@v6
46+
with:
47+
persist-credentials: false
48+
- name: Set up JDK ${{ matrix.java }}
49+
uses: actions/setup-java@v5
50+
with:
51+
java-version: ${{ matrix.java }}
52+
distribution: temurin
53+
- name: Cache Maven dependencies
54+
uses: actions/cache@v5
55+
with:
56+
path: ~/.m2/repository
57+
key: ci-maven-${{ runner.os }}-${{ runner.arch }}-${{ matrix.suite }}-jdk${{ matrix.java }}-scala${{ matrix.scala }}-${{ hashFiles('**/pom.xml') }}
58+
restore-keys: |
59+
ci-maven-${{ runner.os }}-${{ runner.arch }}-${{ matrix.suite }}-jdk${{ matrix.java }}-scala${{ matrix.scala }}-
60+
- name: Build dependencies and run tests
61+
env:
62+
CI_SUITE: ${{ matrix.suite }}
63+
CI_SCALA: ${{ matrix.scala }}
64+
CI_JAVA: ${{ matrix.java }}
65+
run: bash tools/ci/run-java-tests.sh "$CI_SUITE" "$CI_SCALA" "$CI_JAVA"
66+
- name: Upload failed test reports
67+
if: failure()
68+
uses: actions/upload-artifact@v6
69+
with:
70+
name: test-reports-${{ matrix.suite }}-jdk${{ matrix.java }}-scala${{ matrix.scala }}
71+
path: '**/target/surefire-reports/**'
72+
if-no-files-found: ignore
73+
retention-days: 7
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,21 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
name: Check licensing
16+
name: CI / Licensing
1717

1818
on:
19-
push:
20-
paths-ignore:
21-
- 'docs/**'
22-
- '**/*.md'
23-
- 'paimon-python/**'
24-
pull_request:
25-
paths-ignore:
26-
- 'docs/**'
27-
- '**/*.md'
28-
- 'paimon-python/**'
19+
workflow_call:
20+
21+
permissions:
22+
contents: read
2923

3024
env:
3125
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true
3226

33-
concurrency:
34-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
35-
cancel-in-progress: true
36-
3727
jobs:
38-
build:
28+
check:
29+
name: Artifact licensing
30+
timeout-minutes: 60
3931
runs-on: ubuntu-latest
4032
env:
4133
MVN_COMMON_OPTIONS: -U -B --no-transfer-progress
@@ -50,6 +42,13 @@ jobs:
5042
with:
5143
java-version: 8
5244
distribution: 'temurin'
45+
- name: Cache Maven dependencies
46+
uses: actions/cache@v5
47+
with:
48+
path: ~/.m2/repository
49+
key: ci-maven-licensing-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/pom.xml') }}
50+
restore-keys: |
51+
ci-maven-licensing-${{ runner.os }}-${{ runner.arch }}-
5352
- name: Build
5453
run: |
5554
set -o pipefail

.github/workflows/paimon-python-checks.yml renamed to .github/workflows/ci-python.yml

Lines changed: 24 additions & 19 deletions

0 commit comments

Comments
 (0)