Browse Source

[Improve][CI] improve ci checking (#9325)

3.0.0/version-upgrade
xiangzihao 3 years ago committed by GitHub
parent
commit
40b73f7962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      .github/workflows/backend.yml
  2. 4
      .github/workflows/docs.yml
  3. 17
      .github/workflows/e2e.yml
  4. 30
      .github/workflows/unit-test.yml

30
.github/workflows/backend.yml

@ -38,8 +38,22 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
paths-filter:
name: Backend-Path-Filter
runs-on: ubuntu-latest
outputs:
ignore: ${{ steps.filter.outputs.ignore }}
steps:
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter
with:
filters: |
ignore:
- '(docs/**|dolphinscheduler-ui/**|dolphinscheduler-ui-next/**)'
build: build:
name: Build name: Backend-Build
needs: paths-filter
if: ${{ needs.paths-filter.outputs.ignore == 'false' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
@ -63,3 +77,17 @@ jobs:
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
- name: Check dependency license - name: Check dependency license
run: tools/dependencies/check-LICENSE.sh run: tools/dependencies/check-LICENSE.sh
result:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ build ]
if: always()
steps:
- name: Status
run: |
if [[ ${{ needs.build.result }} == 'success' || ${{ needs.paths-filter.outputs.ignore == 'true' }} ]]; then
echo "Passed!"
else
exit -1
fi

4
.github/workflows/docs.yml

@ -18,6 +18,8 @@ name: Docs
on: on:
pull_request: pull_request:
paths:
- 'docs/**'
concurrency: concurrency:
group: doc-${{ github.event.pull_request.number || github.ref }} group: doc-${{ github.event.pull_request.number || github.ref }}
@ -47,6 +49,6 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: sudo npm install -g markdown-link-check@3.10.0 - run: sudo npm install -g markdown-link-check@3.10.0
- run: | - run: |
for file in $(find . -name "*.md"); do for file in $(find ./docs -name "*.md"); do
markdown-link-check -c .dlc.json -q "$file" markdown-link-check -c .dlc.json -q "$file"
done done

17
.github/workflows/e2e.yml

@ -29,8 +29,22 @@ concurrency:
jobs: jobs:
paths-filter:
name: E2E-Path-Filter
runs-on: ubuntu-latest
outputs:
ignore: ${{ steps.filter.outputs.ignore }}
steps:
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter
with:
filters: |
ignore:
- '(docs/**)'
build: build:
name: E2E-Build name: E2E-Build
needs: paths-filter
if: ${{ needs.paths-filter.outputs.ignore == 'false' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
@ -137,7 +151,6 @@ jobs:
name: recording-${{ matrix.case.name }} name: recording-${{ matrix.case.name }}
path: ${{ env.RECORDING_PATH }} path: ${{ env.RECORDING_PATH }}
retention-days: 1 retention-days: 1
result: result:
name: E2E name: E2E
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -147,7 +160,7 @@ jobs:
steps: steps:
- name: Status - name: Status
run: | run: |
if [[ ${{ needs.e2e.result }} == 'success' ]]; then if [[ ${{ needs.e2e.result }} == 'success' || ${{ needs.paths-filter.outputs.ignore == 'true' }} ]]; then
echo "Passed!" echo "Passed!"
else else
exit -1 exit -1

30
.github/workflows/unit-test.yml

@ -36,8 +36,22 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
paths-filter:
name: Unit-Test-Path-Filter
runs-on: ubuntu-latest
outputs:
ignore: ${{ steps.filter.outputs.ignore }}
steps:
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter
with:
filters: |
ignore:
- '(docs/**)'
unit-test: unit-test:
name: Unit Test name: Unit-Test
needs: paths-filter
if: ${{ needs.paths-filter.outputs.ignore == 'false' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
@ -96,3 +110,17 @@ jobs:
with: with:
name: unit-test-logs name: unit-test-logs
path: ${LOG_DIR} path: ${LOG_DIR}
result:
name: Unit Test
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ unit-test ]
if: always()
steps:
- name: Status
run: |
if [[ ${{ needs.unit-test.result }} == 'success' || ${{ needs.paths-filter.outputs.ignore == 'true' }} ]]; then
echo "Passed!"
else
exit -1
fi

Loading…
Cancel
Save