chore: skip coverage job if PR is from fork

This commit is contained in:
LeoYuan 袁力皓 2022-05-07 16:23:55 +08:00 committed by 絮黎
parent a5f6d76bda
commit 754cfd6e1f

View File

@ -1,4 +1,4 @@
name: lint & test name: coverage
on: on:
pull_request: pull_request:
@ -8,10 +8,9 @@ on:
jobs: jobs:
cov-designer: cov-designer:
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
# skip fork's PR, otherwise it fails while making a comment
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -29,13 +28,12 @@ jobs:
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
skip-step: install skip-step: install
annotations: none annotations: none
package-manager: yarn base-coverage-file: ./report.json
cov-renderer-core: cov-renderer-core:
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
# skip fork's PR, otherwise it fails while making a comment
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -53,13 +51,12 @@ jobs:
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
skip-step: install skip-step: install
annotations: none annotations: none
package-manager: yarn base-coverage-file: ./report.json
cov-react-simulator-renderer: cov-react-simulator-renderer:
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
# skip fork's PR, otherwise it fails while making a comment
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -77,4 +74,4 @@ jobs:
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
skip-step: install skip-step: install
annotations: none annotations: none
package-manager: yarn base-coverage-file: ./report.json