|
42 | 42 | continue-on-error: true
|
43 | 43 | steps:
|
44 | 44 | - uses: actions/checkout@v3
|
| 45 | + with: |
| 46 | + ref: ${{ github.base_ref }} |
45 | 47 | - name: Use Node.js 20.x
|
46 | 48 | uses: actions/setup-node@v3
|
47 | 49 | with:
|
|
65 | 67 | uses: actions/upload-artifact@v4
|
66 | 68 | with:
|
67 | 69 | name: ref-lcov.info
|
68 |
| - path: ./coverage/merged/lcov.info |
69 |
| - |
70 |
| - - name: Generate Code Coverage report |
71 |
| - id: code-coverage |
72 |
| - uses: barecheck/code-coverage-action@v1 |
73 |
| - with: |
74 |
| - github-token: ${{ secrets.GITHUB_TOKEN }} |
75 |
| - lcov-file: './coverage/merged/lcov.info' |
76 |
| - base-lcov-file: './coverage/merged/lcov.info' |
77 |
| - send-summary-comment: true |
78 |
| - show-annotations: 'warning' |
| 70 | + path: coverage/merged/lcov.info |
79 | 71 |
|
80 | 72 | test-on-macos:
|
81 | 73 | runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && 'macos-latest' || 'macos-selfhosted-12-arm64' }}
|
@@ -231,3 +223,45 @@ jobs:
|
231 | 223 | name: playwright-report
|
232 | 224 | path: electron/playwright-report/
|
233 | 225 | retention-days: 2
|
| 226 | + |
| 227 | + coverage-check: |
| 228 | + runs-on: ubuntu-latest |
| 229 | + needs: base_branch_cov |
| 230 | + continue-on-error: true |
| 231 | + steps: |
| 232 | + - name: Getting the repo |
| 233 | + uses: actions/checkout@v3 |
| 234 | + with: |
| 235 | + fetch-depth: 0 |
| 236 | + |
| 237 | + - name: Installing node |
| 238 | + uses: actions/setup-node@v3 |
| 239 | + with: |
| 240 | + node-version: 20 |
| 241 | + - name: 'Cleanup cache' |
| 242 | + continue-on-error: true |
| 243 | + run: | |
| 244 | + rm -rf ~/jan |
| 245 | + make clean |
| 246 | +
|
| 247 | + - name: Install dependencies |
| 248 | + run: | |
| 249 | + make lint |
| 250 | +
|
| 251 | + - name: Run test coverage |
| 252 | + run: | |
| 253 | + yarn test:coverage |
| 254 | +
|
| 255 | + - name: Download code coverage report from base branch |
| 256 | + uses: actions/download-artifact@v4 |
| 257 | + with: |
| 258 | + name: ref-lcov.info |
| 259 | + - name: Generate Code Coverage report |
| 260 | + id: code-coverage |
| 261 | + uses: barecheck/code-coverage-action@v1 |
| 262 | + with: |
| 263 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 264 | + lcov-file: './coverage/merged/lcov.info' |
| 265 | + base-lcov-file: './lcov.info' |
| 266 | + send-summary-comment: true |
| 267 | + show-annotations: 'warning' |
0 commit comments