From d18cf184c69fafe11abc501f789ac08570038349 Mon Sep 17 00:00:00 2001 From: xiangzihao <460888207@qq.com> Date: Tue, 12 Apr 2022 14:43:15 +0800 Subject: [PATCH] [CI] Improve CI (#9436) * test * test * test * test * test * test * test * test * test * improve ci * improve ci * improve ci --- .github/workflows/backend.yml | 7 ++++--- .github/workflows/e2e.yml | 5 +++-- .github/workflows/unit-test.yml | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index c9fcc543b..fa7495aa4 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -44,16 +44,17 @@ jobs: 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/**|dolphinscheduler-ui/**|dolphinscheduler-ui-next/**)' + - '!(docs/**)' build: name: Backend-Build needs: paths-filter - if: ${{ needs.paths-filter.outputs.not-ignore == 'true' }} + if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }} runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -86,7 +87,7 @@ jobs: steps: - name: Status run: | - if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' ]]; then + if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then echo "Skip Build!" exit 0 fi diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f34be88b1..c8f7ef7cf 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -35,6 +35,7 @@ jobs: outputs: not-ignore: ${{ steps.filter.outputs.not-ignore }} steps: + - uses: actions/checkout@v2 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 id: filter with: @@ -44,7 +45,7 @@ jobs: build: name: E2E-Build needs: paths-filter - if: ${{ needs.paths-filter.outputs.not-ignore == 'true' }} + if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }} runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -160,7 +161,7 @@ jobs: steps: - name: Status run: | - if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' ]]; then + if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then echo "Skip E2E!" exit 0 fi diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index d7016ad99..985ebfb40 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -42,6 +42,7 @@ jobs: outputs: not-ignore: ${{ steps.filter.outputs.not-ignore }} steps: + - uses: actions/checkout@v2 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 id: filter with: @@ -51,7 +52,7 @@ jobs: unit-test: name: Unit-Test needs: paths-filter - if: ${{ needs.paths-filter.outputs.not-ignore == 'true' }} + if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }} runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -119,7 +120,7 @@ jobs: steps: - name: Status run: | - if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' ]]; then + if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then echo "Skip Unit Test!" exit 0 fi