Skip to content

Commit 4262a52

Browse files
committed
Add CI GitHub Action
1 parent 06369af commit 4262a52

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Continuous Integration
2+
on: [push]
3+
4+
jobs:
5+
tests:
6+
runs-on: ubuntu-latest
7+
environment: sauce
8+
permissions: read-all
9+
env:
10+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
11+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
12+
SAUCE_TUNNEL_ID: github-action-tunnel
13+
steps:
14+
- name: Setup sauce connect
15+
uses: saucelabs/sauce-connect-action@v2
16+
with:
17+
username: ${{ secrets.SAUCE_USERNAME }}
18+
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
19+
tunnelIdentifier: github-action-tunnel
20+
scVersion: 4.7.1
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- uses: actions/setup-node@v2
24+
with:
25+
node-version: 16
26+
- name: Cache dependencies
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.npm
30+
key: npm-${{ hashFiles('package-lock.json') }}
31+
restore-keys: npm-
32+
- name: Install packages
33+
run: npm ci
34+
- name: Lint code
35+
run: npm run lint
36+
- name: Run browser tests in Saucelabs
37+
run: npm run test-ci
38+
timeout-minutes: 5

0 commit comments

Comments
 (0)