Skip to content

Commit 819338e

Browse files
terence-yooclaude
andcommitted
Add GitHub Actions CI workflow files from master
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 61c0798 commit 819338e

File tree

3 files changed

+374
-0
lines changed

3 files changed

+374
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# yamllint disable rule:line-length
19+
---
20+
name: Yetus General Check
21+
22+
"on":
23+
pull_request:
24+
types: [opened, synchronize, reopened]
25+
26+
permissions: {}
27+
28+
jobs:
29+
general-check:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 600
32+
permissions:
33+
contents: read
34+
statuses: write
35+
36+
env:
37+
YETUS_VERSION: '0.15.0'
38+
39+
steps:
40+
- name: Checkout HBase
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
with:
43+
path: src
44+
fetch-depth: 0
45+
persist-credentials: false
46+
47+
- name: Set up JDK 17
48+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
49+
with:
50+
java-version: '17'
51+
distribution: 'temurin'
52+
53+
- name: Maven cache
54+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
55+
with:
56+
path: ~/.m2
57+
key: hbase-m2-${{ hashFiles('**/pom.xml') }}
58+
restore-keys: |
59+
hbase-m2-
60+
61+
- name: Download Yetus
62+
run: |
63+
mkdir -p yetus
64+
cd yetus
65+
bash "${{ github.workspace }}/src/dev-support/jenkins-scripts/cache-apache-project-artifact.sh" \
66+
--keys 'https://downloads.apache.org/yetus/KEYS' \
67+
--verify-tar-gz \
68+
./apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz \
69+
yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
70+
tar --strip-components=1 -xzf apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
71+
rm apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
72+
73+
- name: Run Yetus General Check
74+
env:
75+
ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump"
76+
DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile"
77+
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
78+
GITHUB_USER: ${{ github.actor }}
79+
PATCHDIR: "${{ github.workspace }}/yetus-general-check/output"
80+
PLUGINS: "all,-javadoc,-jira,-shadedjars,-unit"
81+
SET_JAVA_HOME: "/usr/lib/jvm/java-17"
82+
SOURCEDIR: "${{ github.workspace }}/src"
83+
TESTS_FILTER: "checkstyle,javac,pylint,shellcheck,shelldocs,blanks,perlcritic,ruby-lint,rubocop"
84+
YETUSDIR: "${{ github.workspace }}/yetus"
85+
AUTHOR_IGNORE_LIST: "src/main/asciidoc/_chapters/developer.adoc"
86+
BLANKS_EOL_IGNORE_FILE: "dev-support/blanks-eol-ignore.txt"
87+
BLANKS_TABS_IGNORE_FILE: "dev-support/blanks-tabs-ignore.txt"
88+
EXCLUDE_TESTS_URL: "https://ci-hbase.apache.org/job/HBase-Find-Flaky-Tests/job/${{ github.base_ref }}/lastSuccessfulBuild/artifact/output/excludes"
89+
BUILD_THREAD: "4"
90+
SUREFIRE_FIRST_PART_FORK_COUNT: "1.0C"
91+
SUREFIRE_SECOND_PART_FORK_COUNT: "0.5C"
92+
BRANCH_NAME: "${{ github.base_ref }}"
93+
DEBUG: 'true'
94+
run: |
95+
cd "${{ github.workspace }}"
96+
bash src/dev-support/jenkins_precommit_github_yetus.sh
97+
98+
- name: Publish Job Summary
99+
if: always()
100+
run: |
101+
cd "${{ github.workspace }}"
102+
python3 src/dev-support/yetus_console_to_md.py yetus-general-check/output >> $GITHUB_STEP_SUMMARY
103+
104+
- name: Publish Test Results
105+
if: always()
106+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
107+
with:
108+
name: yetus-general-check-output
109+
path: ${{ github.workspace }}/yetus-general-check/output
110+
retention-days: 7
111+
112+
zizmor:
113+
runs-on: ubuntu-latest
114+
timeout-minutes: 5
115+
permissions:
116+
contents: read
117+
118+
steps:
119+
- name: Check for workflow changes
120+
id: changes
121+
env:
122+
GH_TOKEN: ${{ github.token }}
123+
run: |
124+
if gh pr diff "${{ github.event.pull_request.number }}" --repo "${{ github.repository }}" --name-only | grep -q '^\.github/workflows/'; then
125+
echo "changed=true" >> "$GITHUB_OUTPUT"
126+
else
127+
echo "changed=false" >> "$GITHUB_OUTPUT"
128+
fi
129+
130+
- name: Checkout HBase
131+
if: steps.changes.outputs.changed == 'true'
132+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
133+
with:
134+
persist-credentials: false
135+
136+
- name: Run zizmor
137+
if: steps.changes.outputs.changed == 'true'
138+
run: pipx run zizmor --min-severity=medium .github/workflows/
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# yamllint disable rule:line-length
19+
---
20+
name: Yetus JDK17 Hadoop3 Compile Check
21+
22+
"on":
23+
pull_request:
24+
types: [opened, synchronize, reopened]
25+
26+
permissions:
27+
contents: read
28+
statuses: write
29+
30+
jobs:
31+
jdk17-hadoop3-compile-check:
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 60
34+
35+
env:
36+
YETUS_VERSION: '0.15.0'
37+
38+
steps:
39+
- name: Checkout HBase
40+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
with:
42+
path: src
43+
fetch-depth: 0
44+
persist-credentials: false
45+
46+
- name: Set up JDK 17
47+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
48+
with:
49+
java-version: '17'
50+
distribution: 'temurin'
51+
52+
- name: Maven cache
53+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
54+
with:
55+
path: ~/.m2
56+
key: hbase-m2-${{ hashFiles('**/pom.xml') }}
57+
restore-keys: |
58+
hbase-m2-
59+
60+
- name: Download Yetus
61+
run: |
62+
mkdir -p yetus
63+
cd yetus
64+
bash "${{ github.workspace }}/src/dev-support/jenkins-scripts/cache-apache-project-artifact.sh" \
65+
--keys 'https://downloads.apache.org/yetus/KEYS' \
66+
--verify-tar-gz \
67+
./apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz \
68+
yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
69+
tar --strip-components=1 -xzf apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
70+
rm apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
71+
72+
- name: Run Yetus JDK17 Hadoop3 Compile Check
73+
env:
74+
ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump"
75+
DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile"
76+
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
77+
GITHUB_USER: ${{ github.actor }}
78+
PATCHDIR: "${{ github.workspace }}/yetus-jdk17-hadoop3-compile-check/output"
79+
PLUGINS: "compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars"
80+
SET_JAVA_HOME: "/usr/lib/jvm/java-17"
81+
SOURCEDIR: "${{ github.workspace }}/src"
82+
TESTS_FILTER: "javac,javadoc"
83+
YETUSDIR: "${{ github.workspace }}/yetus"
84+
AUTHOR_IGNORE_LIST: "src/main/asciidoc/_chapters/developer.adoc"
85+
BLANKS_EOL_IGNORE_FILE: "dev-support/blanks-eol-ignore.txt"
86+
BLANKS_TABS_IGNORE_FILE: "dev-support/blanks-tabs-ignore.txt"
87+
BUILD_THREAD: "4"
88+
BRANCH_NAME: "${{ github.base_ref }}"
89+
SKIP_ERRORPRONE: 'true'
90+
DEBUG: 'true'
91+
run: |
92+
cd "${{ github.workspace }}"
93+
bash src/dev-support/jenkins_precommit_github_yetus.sh
94+
95+
- name: Publish Job Summary
96+
if: always()
97+
run: |
98+
cd "${{ github.workspace }}"
99+
python3 src/dev-support/yetus_console_to_md.py yetus-jdk17-hadoop3-compile-check/output >> $GITHUB_STEP_SUMMARY
100+
101+
- name: Publish Results
102+
if: always()
103+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
104+
with:
105+
name: yetus-jdk17-hadoop3-compile-check-output
106+
path: ${{ github.workspace }}/yetus-jdk17-hadoop3-compile-check/output
107+
retention-days: 7
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# yamllint disable rule:line-length
19+
---
20+
name: Yetus JDK17 Hadoop3 Unit Check
21+
22+
"on":
23+
pull_request:
24+
types: [opened, synchronize, reopened]
25+
26+
permissions:
27+
contents: read
28+
statuses: write
29+
30+
jobs:
31+
jdk17-hadoop3-unit-check:
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 360
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- name: "small"
40+
test_profile: "runSmallTests"
41+
- name: "medium"
42+
test_profile: "runMediumTests"
43+
# Large tests split alphabetically by class name (after "Test" prefix)
44+
# Wave 1: Test[A-H]*, Wave 2: Test[I-R]*, Wave 3: Test[S-Z]*
45+
- name: "large-wave-1"
46+
test_profile: "runLargeTests-wave1"
47+
- name: "large-wave-2"
48+
test_profile: "runLargeTests-wave2"
49+
- name: "large-wave-3"
50+
test_profile: "runLargeTests-wave3"
51+
52+
name: ${{ matrix.name }}
53+
54+
env:
55+
YETUS_VERSION: '0.15.0'
56+
57+
steps:
58+
- name: Checkout HBase
59+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
path: src
62+
fetch-depth: 0
63+
persist-credentials: false
64+
65+
- name: Set up JDK 17
66+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
67+
with:
68+
java-version: '17'
69+
distribution: 'temurin'
70+
71+
- name: Maven cache
72+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
73+
with:
74+
path: ~/.m2
75+
key: hbase-m2-${{ hashFiles('**/pom.xml') }}
76+
restore-keys: |
77+
hbase-m2-
78+
79+
- name: Download Yetus
80+
run: |
81+
mkdir -p yetus
82+
cd yetus
83+
bash "${{ github.workspace }}/src/dev-support/jenkins-scripts/cache-apache-project-artifact.sh" \
84+
--keys 'https://downloads.apache.org/yetus/KEYS' \
85+
--verify-tar-gz \
86+
./apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz \
87+
yetus/${{ env.YETUS_VERSION }}/apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
88+
tar --strip-components=1 -xzf apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
89+
rm apache-yetus-${{ env.YETUS_VERSION }}-bin.tar.gz
90+
91+
- name: Run Yetus JDK17 Hadoop3 Unit Check
92+
env:
93+
ARCHIVE_PATTERN_LIST: "TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump"
94+
DOCKERFILE: "${{ github.workspace }}/src/dev-support/docker/Dockerfile"
95+
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
96+
GITHUB_USER: ${{ github.actor }}
97+
PATCHDIR: "${{ github.workspace }}/yetus-jdk17-hadoop3-unit-check/output"
98+
PLUGINS: "github,htmlout,maven,unit"
99+
SET_JAVA_HOME: "/usr/lib/jvm/java-17"
100+
SOURCEDIR: "${{ github.workspace }}/src"
101+
YETUSDIR: "${{ github.workspace }}/yetus"
102+
AUTHOR_IGNORE_LIST: "src/main/asciidoc/_chapters/developer.adoc"
103+
BLANKS_EOL_IGNORE_FILE: "dev-support/blanks-eol-ignore.txt"
104+
BLANKS_TABS_IGNORE_FILE: "dev-support/blanks-tabs-ignore.txt"
105+
EXCLUDE_TESTS_URL: "https://ci-hbase.apache.org/job/HBase-Find-Flaky-Tests/job/${{ github.base_ref }}/lastSuccessfulBuild/artifact/output/excludes"
106+
BUILD_THREAD: "4"
107+
SUREFIRE_FIRST_PART_FORK_COUNT: "1.0C"
108+
SUREFIRE_SECOND_PART_FORK_COUNT: "0.5C"
109+
BRANCH_NAME: "${{ github.base_ref }}"
110+
SKIP_ERRORPRONE: 'true'
111+
DEBUG: 'true'
112+
TEST_PROFILE: ${{ matrix.test_profile }}
113+
run: |
114+
cd "${{ github.workspace }}"
115+
bash src/dev-support/jenkins_precommit_github_yetus.sh
116+
117+
- name: Publish Job Summary
118+
if: always()
119+
run: |
120+
cd "${{ github.workspace }}"
121+
python3 src/dev-support/yetus_console_to_md.py yetus-jdk17-hadoop3-unit-check/output >> $GITHUB_STEP_SUMMARY
122+
123+
- name: Publish Test Results
124+
if: always()
125+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
126+
with:
127+
name: yetus-jdk17-hadoop3-unit-check-${{ matrix.name }}
128+
path: ${{ github.workspace }}/yetus-jdk17-hadoop3-unit-check/output
129+
retention-days: 7

0 commit comments

Comments
 (0)