-
Notifications
You must be signed in to change notification settings - Fork 31
84 lines (76 loc) · 2.72 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Continuous Integration
on:
pull_request:
permissions: read-all
jobs:
unit-tests:
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup
uses: ./.github/actions/setup
- run: npm run version:check
- name: Size check
run: npm run size-limit
- name: Lint code
run: npm run lint
- name: Lint docs
run: npm run lint:markdown
- name: Transpile code
run: npm run compile
- name: Unit test
run: npm run test:unit:ci
- name: Unit test (nodejs)
run: npm run test:unit:ci-node
saucelabs-integration-tests:
runs-on: ubuntu-latest
permissions: read-all
environment: integration
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_TUNNEL_ID: ${{ secrets.SAUCE_TUNNEL_ID }}
strategy:
fail-fast: false
matrix:
browser: [edge]
steps:
- name: Setup sauce connect
uses: saucelabs/[email protected]
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ secrets.SAUCE_TUNNEL_ID }}
- name: Checkout
uses: actions/[email protected]
- name: Setup
uses: ./.github/actions/setup
- name: Add to hosts file
run: echo "127.0.0.1 local.test" | sudo tee -a /etc/hosts
- name: Run integration tests in Saucelabs
run: npm run test:integration:remote -- --env ${{ matrix.browser }}
timeout-minutes: 15
local-integration-tests:
runs-on: ubuntu-latest
permissions: read-all
strategy:
fail-fast: false
matrix:
browser: [headlessChrome, headlessFirefox]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup
uses: ./.github/actions/setup
- name: Local integration tests using ${{ matrix.browser }}
run: npm run test:integration:local:${{ matrix.browser }}:_execute
- name: Upload test logs
uses: actions/[email protected]
if: ${{ failure() }}
with:
name: test-results ${{ matrix.browser }}
path: |
packages/web/tests_output/
packages/web/logs/