Skip to content

Commit 5611376

Browse files
authored
Add CI Workflow
1 parent 4963384 commit 5611376

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)