-
Notifications
You must be signed in to change notification settings - Fork 276
53 lines (53 loc) · 1.69 KB
/
Checks.yml
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
name: PR Checks
on:
push:
branches:
- main
pull_request:
jobs:
'Checking':
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Ubuntu is not ubuntu-latest as that is causing hangs in the CI
os: [macos-latest, ubuntu-20.04, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: ' Startup ChromeDriver and Display in Ubuntu'
shell: bash
if: matrix.os == 'ubuntu-20.04'
run: |
export DISPLAY=:99
# TODO: need to download driver according to electron's version
wget --directory-prefix=/tmp https://chromedriver.storage.googleapis.com/87.0.4280.88/chromedriver_linux64.zip
unzip -d /tmp/chromedriver /tmp/chromedriver_linux64.zip
sudo chmod +x /tmp/chromedriver/chromedriver
/tmp/chromedriver/chromedriver &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- name: ' Install Dependencies'
shell: bash
run: |
npm install
- name: ' Tests'
shell: bash
env:
DISPLAY: ':99'
run: |
npm run test:jest
- name: ' Create COV_REPORT'
run: |
mkdir COV_REPORT
- name: ' Copy jest results'
run: |
cp coverage_jest/coverage-final.json COV_REPORT/coverage-final-jest.json
- name: ' CodeCov'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: COV_REPORT/coverage-final-jest.json
name: codecov-${{ matrix.os }}
verbose: true