-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.49 KB
/
test.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
name: 'Build & Test'
on: [push, pull_request_target]
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: npm ci --ignore-scripts
- name: Lint
run: npm run lint
- name: Build
run: npm run build
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Setup BrowserStack environment
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Start BrowserStack tunnel
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: Run tests on BrowserStack
run: npm run test-remote
- name: Stop BrowserStack tunnel
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop
- name: Report code coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info