-
-
Notifications
You must be signed in to change notification settings - Fork 134
81 lines (79 loc) · 2.29 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Run CI
on:
# push:
# branches-ignore:
# - develop
# - release/**
# paths-ignore:
# - '**/*.md'
pull_request:
workflow_dispatch:
jobs:
sonar:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install
run: npm ci
- name: Compile
run: npm run compile
- name: Init window e2e test subpackage
run: npm --prefix e2e/window-test ci
- name: Clean coverage report
run: npm run coverage:clean
- name: Generate coverage report
uses: GabrielBB/xvfb-action@v1
env:
NODE_OPTIONS: "--max-old-space-size=8192"
with:
run: npm run coverage -- --coverageDirectory=coverage/unit
- name: Run Electron e2e test subpackage
uses: GabrielBB/xvfb-action@v1
with:
run: npm --prefix e2e/electron-test cit
- name: Merge coverage reports
run: |
npm run coverage:merge
npm run coverage:merge-report
- name: Send results to SonarCloud
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
test:
needs:
- sonar
strategy:
matrix:
os: [windows-latest, macos-latest]
node: [18]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}
- name: Install
run: npm ci
- name: Compile
run: npm run compile
- name: Init window e2e test subpackage
run: npm --prefix e2e/window-test ci
- name: Generate coverage report
uses: GabrielBB/xvfb-action@v1
with:
run: |
npx playwright install --with-deps
npm run coverage -- --coverageDirectory=coverage/unit
- name: Run Electron e2e test subpackage
uses: GabrielBB/xvfb-action@v1
with:
run: npm --prefix e2e/electron-test cit