|
14 | 14 | # See the License for the specific language governing permissions and |
15 | 15 | # limitations under the License. |
16 | 16 | --- |
17 | | -name: Build CI with different platforms/configs |
| 17 | +name: Tez Fork CI |
18 | 18 |
|
19 | | -'on': |
20 | | - push: |
21 | | - branches: |
22 | | - - 'master' |
| 19 | +on: |
23 | 20 | pull_request: |
| 21 | + # Triggers the workflow only when a PR is raised against the master branch |
24 | 22 | 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 |
33 | 24 |
|
34 | 25 | 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 | + |
41 | 29 | 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