Skip to content

Commit e7e6229

Browse files
authored
Merge branch 'dev' into feat/definition-close
2 parents 298f8d8 + 1440045 commit e7e6229

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.asf.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ github:
4545
- Unit Test
4646
- E2E
4747
- Docs
48+
- Frontend Build
4849
- "Mergeable: milestone-label-check"
4950
required_pull_request_reviews:
5051
dismiss_stale_reviews: true

.github/workflows/frontend.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,25 @@ concurrency:
3838
cancel-in-progress: true
3939

4040
jobs:
41+
paths-filter:
42+
name: Frontend-Path-Filter
43+
runs-on: ubuntu-latest
44+
outputs:
45+
not-ignore: ${{ steps.filter.outputs.not-ignore }}
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
49+
id: filter
50+
with:
51+
filters: |
52+
not-ignore:
53+
- '!(docs/**)'
4154
build:
4255
name: Build
56+
needs: paths-filter
57+
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
4358
runs-on: ${{ matrix.os }}
44-
timeout-minutes: 20
59+
timeout-minutes: 30
4560
strategy:
4661
matrix:
4762
os: [ ubuntu-latest, macos-latest ]
@@ -56,9 +71,28 @@ jobs:
5671
uses: actions/setup-node@v2
5772
with:
5873
node-version: 16
59-
- name: Compile and Build
74+
- name: Compile and Build on ${{ matrix.os }}
6075
run: |
76+
set -x
6177
npm install pnpm@7 -g
6278
pnpm install
6379
pnpm run lint
6480
pnpm run build:prod
81+
result:
82+
name: Frontend Build
83+
runs-on: ubuntu-latest
84+
timeout-minutes: 30
85+
needs: [ build, paths-filter ]
86+
if: always()
87+
steps:
88+
- uses: actions/checkout@v2
89+
- name: Status
90+
run: |
91+
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
92+
echo "Skip Frontend Build!"
93+
exit 0
94+
fi
95+
if [[ ${{ needs.build.result }} != 'success' ]]; then
96+
echo "Frontend Build Failed!"
97+
exit -1
98+
fi

0 commit comments

Comments
 (0)