Skip to content

Commit b090fee

Browse files
authored
[Chore] Polish ci (#18102)
1 parent 46f0f3c commit b090fee

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/backend.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ jobs:
136136
runs-on: ubuntu-latest
137137
timeout-minutes: 20
138138
strategy:
139-
fail-fast: false
140139
matrix:
141140
version: ["3.1.9", "3.2.0", "3.3.1"]
142141
case:

.github/workflows/unit-test.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ jobs:
4949
not-ignore:
5050
- '!(docs/**)'
5151
52+
sanity-check:
53+
name: Sanity Check
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v6
57+
with:
58+
submodules: true
59+
- name: Sanity Check
60+
uses: ./.github/actions/sanity-check
61+
with:
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
5264
generate-matrix:
5365
name: Generate Module Matrix
5466
runs-on: ubuntu-latest
@@ -84,11 +96,10 @@ jobs:
8496
8597
unit-test:
8698
name: Unit-Test (${{ matrix.module }} | Java ${{ matrix.java }})
87-
needs: [ paths-filter, generate-matrix ]
99+
needs: [ paths-filter, generate-matrix, sanity-check ]
88100
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
89101
runs-on: ubuntu-latest
90102
strategy:
91-
fail-fast: false
92103
matrix:
93104
java: [ '8', '11' ]
94105
module: ${{ fromJSON(needs.generate-matrix.outputs.matrix).module }}
@@ -101,11 +112,6 @@ jobs:
101112
- name: Collect Workflow Metrics
102113
uses: ./.github/actions/actions-workflow-metrics
103114

104-
- name: Sanity Check
105-
uses: ./.github/actions/sanity-check
106-
with:
107-
token: ${{ secrets.GITHUB_TOKEN }}
108-
109115
- name: Set up JDK ${{ matrix.java }}
110116
uses: actions/setup-java@v5
111117
with:
@@ -264,7 +270,7 @@ jobs:
264270
name: Unit Test
265271
runs-on: ubuntu-latest
266272
timeout-minutes: 5
267-
needs: [ unit-test, paths-filter, sonar ]
273+
needs: [ unit-test, paths-filter, sonar, sanity-check ]
268274
if: always()
269275
steps:
270276
- name: Status
@@ -273,6 +279,10 @@ jobs:
273279
echo "Skip Unit Test!"
274280
exit 0
275281
fi
282+
if [[ ${{ needs.sanity-check.result }} != 'success' ]]; then
283+
echo "Sanity Check Failed!"
284+
exit -1
285+
fi
276286
if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
277287
echo "Unit Test Failed!"
278288
exit -1

0 commit comments

Comments
 (0)