-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (47 loc) · 1.45 KB
/
ci.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
name: Continuous Integration
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
environment: sauce
permissions: read-all
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_TUNNEL_ID: github-action-tunnel
steps:
- name: Setup sauce connect
uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: github-action-tunnel
scVersion: 4.7.1
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install packages
run: npm ci
- name: Lint code
run: npm run lint
- name: Run browser tests in Saucelabs
run: npm run test-ci
timeout-minutes: 5
- name: Install lcov
run: |
sudo apt update
sudo apt install lcov
- name: Merge lcov reports
run: find coverage -name lcov.info -exec echo -a \"{}\" \; | xargs lcov -o coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}