Browse Source

[CI] Frontend ci require passed before merge (#15735)

* frontend ci require passed before merge
dev_wenjun_refactorMaster
xiangzihao 1 month ago committed by GitHub
parent
commit
1440045fb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      .asf.yaml
  2. 38
      .github/workflows/frontend.yml

1
.asf.yaml

@ -45,6 +45,7 @@ github:
- Unit Test
- E2E
- Docs
- Frontend Build
- "Mergeable: milestone-label-check"
required_pull_request_reviews:
dismiss_stale_reviews: true

38
.github/workflows/frontend.yml

@ -38,10 +38,25 @@ concurrency:
cancel-in-progress: true
jobs:
paths-filter:
name: Frontend-Path-Filter
runs-on: ubuntu-latest
outputs:
not-ignore: ${{ steps.filter.outputs.not-ignore }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter
with:
filters: |
not-ignore:
- '!(docs/**)'
build:
name: Build
needs: paths-filter
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
@ -56,9 +71,28 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
- name: Compile and Build
- name: Compile and Build on ${{ matrix.os }}
run: |
set -x
npm install pnpm@7 -g
pnpm install
pnpm run lint
pnpm run build:prod
result:
name: Frontend Build
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ build, paths-filter ]
if: always()
steps:
- uses: actions/checkout@v2
- name: Status
run: |
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
echo "Skip Frontend Build!"
exit 0
fi
if [[ ${{ needs.build.result }} != 'success' ]]; then
echo "Frontend Build Failed!"
exit -1
fi

Loading…
Cancel
Save