@@ -42,27 +42,40 @@ jobs:
42
42
continue-on-error : true
43
43
steps :
44
44
- uses : actions/checkout@v3
45
- with :
46
- ref : ${{ github.base_ref }}
47
45
- name : Use Node.js 20.x
48
46
uses : actions/setup-node@v3
49
47
with :
50
48
node-version : 20
51
49
50
+ - name : ' Cleanup cache'
51
+ continue-on-error : true
52
+ run : |
53
+ rm -rf ~/jan
54
+ make clean
55
+
52
56
- name : Install dependencies
53
57
run : |
54
- make config-yarn
55
- yarn
56
- yarn build:core
58
+ make lint
57
59
58
60
- name : Run test coverage
59
- run : yarn test:coverage
61
+ run : |
62
+ yarn test:coverage
60
63
61
64
- name : Upload code coverage for ref branch
62
65
uses : actions/upload-artifact@v4
63
66
with :
64
67
name : ref-lcov.info
65
- path : ./coverage/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'
66
79
67
80
test-on-macos :
68
81
runs-on : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && 'macos-latest' || 'macos-selfhosted-12-arm64' }}
78
91
with :
79
92
node-version : 20
80
93
81
- - name : Set IS_TEST environment variable
82
- if : github.event.pull_request.head.repo.full_name == github.repository
83
- run : echo "IS_TEST=true" >> $GITHUB_ENV
84
-
85
94
- name : ' Cleanup cache'
86
95
continue-on-error : true
87
96
run : |
@@ -222,51 +231,3 @@ jobs:
222
231
name : playwright-report
223
232
path : electron/playwright-report/
224
233
retention-days : 2
225
-
226
- # coverage-check:
227
- # runs-on: ubuntu-latest
228
- # needs: base_branch_cov
229
- # continue-on-error: true
230
- # if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
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
-
242
- # - name: Install yarn
243
- # run: npm install -g yarn
244
-
245
- # - name: 'Cleanup cache'
246
- # continue-on-error: true
247
- # run: |
248
- # rm -rf ~/jan
249
- # make clean
250
-
251
- # - name: Download code coverage report from base branch
252
- # uses: actions/download-artifact@v4
253
- # with:
254
- # name: ref-lcov.info
255
-
256
- # - name: Linter and test coverage
257
- # run: |
258
- # export DISPLAY=$(w -h | awk 'NR==1 {print $2}')
259
- # echo -e "Display ID: $DISPLAY"
260
- # make lint
261
- # yarn build:test
262
- # yarn test:coverage
263
-
264
- # - name: Generate Code Coverage report
265
- # id: code-coverage
266
- # uses: barecheck/code-coverage-action@v1
267
- # with:
268
- # github-token: ${{ secrets.GITHUB_TOKEN }}
269
- # lcov-file: './coverage/lcov.info'
270
- # base-lcov-file: './lcov.info'
271
- # send-summary-comment: true
272
- # show-annotations: 'warning'
0 commit comments