Skip to content

Commit 754cfd6

Browse files
LeoYuanliujuping
authored andcommitted
chore: skip coverage job if PR is from fork
1 parent a5f6d76 commit 754cfd6

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/cov packages.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: lint & test
1+
name: coverage
22

33
on:
44
pull_request:
@@ -8,10 +8,9 @@ on:
88

99
jobs:
1010
cov-designer:
11-
permissions:
12-
checks: write
13-
pull-requests: write
1411
runs-on: ubuntu-latest
12+
# skip fork's PR, otherwise it fails while making a comment
13+
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
1514
steps:
1615
- name: checkout
1716
uses: actions/checkout@v2
@@ -29,13 +28,12 @@ jobs:
2928
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
3029
skip-step: install
3130
annotations: none
32-
package-manager: yarn
31+
base-coverage-file: ./report.json
3332

3433
cov-renderer-core:
35-
permissions:
36-
checks: write
37-
pull-requests: write
3834
runs-on: ubuntu-latest
35+
# skip fork's PR, otherwise it fails while making a comment
36+
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
3937
steps:
4038
- name: checkout
4139
uses: actions/checkout@v2
@@ -53,13 +51,12 @@ jobs:
5351
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
5452
skip-step: install
5553
annotations: none
56-
package-manager: yarn
54+
base-coverage-file: ./report.json
5755

5856
cov-react-simulator-renderer:
59-
permissions:
60-
checks: write
61-
pull-requests: write
6257
runs-on: ubuntu-latest
58+
# skip fork's PR, otherwise it fails while making a comment
59+
if: ${{ github.event.pull_request.head.repo.full_name == 'alibaba/lowcode-engine' }}
6360
steps:
6461
- name: checkout
6562
uses: actions/checkout@v2
@@ -77,4 +74,4 @@ jobs:
7774
test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json
7875
skip-step: install
7976
annotations: none
80-
package-manager: yarn
77+
base-coverage-file: ./report.json

0 commit comments

Comments
 (0)