-
Notifications
You must be signed in to change notification settings - Fork 800
64 lines (47 loc) · 1.35 KB
/
main.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
54
55
56
57
58
59
60
61
62
63
64
name: CI
on: [push, pull_request]
jobs:
style:
runs-on: ubuntu-latest
name: Style checks
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Install dependencies
run: |
npm i prettier
- name: Prettier
run: ./node_modules/prettier/bin-prettier.js --check ./src/* ./src/**/* ./src/**/**/* ./sass/*.scss
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.platform }}
strategy:
matrix:
platform: ["chrome", "firefox"]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Install dependencies
run: npm ci
- name: Build
run: npm run ${{ matrix.platform }}
run-tests:
runs-on: ubuntu-latest
name: Run tests
needs: [ build ]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Install dependencies
run: npm ci
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
- name: Test code
uses: mujo-code/puppeteer-headful@master
with:
args: npm test
- name: Codecov
uses: codecov/[email protected]