GeezerVison is showing github.com — chore: skip coverage job if PR is from fork · Alvison/lowcode-engine@754cfd6
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/cov packages.yml +10-13Lines changed: 10 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -name: lint & test |
| 1 | +name: coverage |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | cov-designer: |
11 | | - permissions: |
12 | | - checks: write |
13 | | - pull-requests: write |
14 | 11 | 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' }} |
15 | 14 | steps: |
16 | 15 | - name: checkout |
17 | 16 | uses: actions/checkout@v2 |
@@ -29,13 +28,12 @@ jobs: |
29 | 28 | test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json |
30 | 29 | skip-step: install |
31 | 30 | annotations: none |
32 | | - package-manager: yarn |
| 31 | + base-coverage-file: ./report.json |
33 | 32 |
|
34 | 33 | cov-renderer-core: |
35 | | - permissions: |
36 | | - checks: write |
37 | | - pull-requests: write |
38 | 34 | 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' }} |
39 | 37 | steps: |
40 | 38 | - name: checkout |
41 | 39 | uses: actions/checkout@v2 |
@@ -53,13 +51,12 @@ jobs: |
53 | 51 | test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json |
54 | 52 | skip-step: install |
55 | 53 | annotations: none |
56 | | - package-manager: yarn |
| 54 | + base-coverage-file: ./report.json |
57 | 55 |
|
58 | 56 | cov-react-simulator-renderer: |
59 | | - permissions: |
60 | | - checks: write |
61 | | - pull-requests: write |
62 | 57 | 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' }} |
63 | 60 | steps: |
64 | 61 | - name: checkout |
65 | 62 | uses: actions/checkout@v2 |
|
77 | 74 | test-script: npm test -- --jest-ci --jest-json --jest-coverage --jest-testLocationInResults --jest-outputFile=report.json |
78 | 75 | skip-step: install |
79 | 76 | annotations: none |
80 | | - package-manager: yarn |
| 77 | + base-coverage-file: ./report.json |