Skip to content

Commit be751a8

Browse files
My github actions
1 parent 17d1549 commit be751a8

1 file changed

Lines changed: 35 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,44 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
---
17-
name: Build CI with different platforms/configs
17+
name: Tez Fork CI
1818

19-
'on':
20-
push:
21-
branches:
22-
- 'master'
19+
on:
2320
pull_request:
21+
# Triggers the workflow only when a PR is raised against the master branch
2422
branches:
25-
- 'master'
26-
27-
concurrency:
28-
group: ${{ github.workflow }}-${{ github.ref }}
29-
cancel-in-progress: true
30-
31-
permissions:
32-
contents: read
23+
- master
3324

3425
jobs:
35-
build:
36-
strategy:
37-
matrix:
38-
java-version: [21, 25]
39-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
40-
runs-on: ${{ matrix.os }}
26+
build-and-test:
27+
runs-on: ubuntu-latest
28+
4129
steps:
42-
- uses: actions/checkout@v6
43-
- uses: actions/setup-java@v5
44-
with:
45-
java-version: ${{ matrix.java-version }}
46-
distribution: 'temurin'
47-
- name: Build with Maven
48-
run: >
49-
mvn --batch-mode --no-transfer-progress clean install
50-
-DskipTests -Dmaven.javadoc.skip=true
51-
${{ runner.os == 'Linux'
52-
&& runner.arch == 'ARM64'
53-
&& '-pl !tez-ui' || '' }}
30+
# Step 1: Check out the repository code using the specified v4 version
31+
- name: Checkout Code
32+
uses: actions/checkout@v6
33+
34+
# Step 2: Set up the Java Environment tailored for JDK 21
35+
- name: Set up JDK
36+
uses: actions/setup-java@v4
37+
with:
38+
java-version: '21'
39+
distribution: 'temurin'
40+
cache: 'maven' # Automatically caches Maven dependencies to speed up subsequent runs
41+
42+
# Step 3: Run the build command skipping tests
43+
- name: Build (Skip Tests)
44+
run: mvn --no-transfer-progress clean install -DskipTests -Ptools
45+
46+
# Step 4: Run the tests command
47+
- name: Run Tests
48+
run: mvn --no-transfer-progress test -Ptools
49+
50+
# Step 5: UT Report
51+
- name: Upload Surefire Reports
52+
uses: actions/upload-artifact@v7
53+
if: always()
54+
with:
55+
name: UT-Report
56+
path: '**/target/surefire-reports/'
57+
retention-days: 7

0 commit comments

Comments
 (0)