forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (141 loc) · 4.23 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Test
on:
push:
branches:
- main
- v7
- v8
- '!l10n_main'
pull_request:
branches-ignore:
- 'l10n_main'
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.18.x, 20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
- name: Dependency Check
run: npm run test:depcheck
- name: Lint / Typings / Unit / Smoke / Component Tests
run: npm run test
- name: Interop Tests
run: npm run test:e2e:cjs
- name: E2E Launch Tests
run: npm run test:e2e:webdriver
# - name: 🐛 Debug Build
# uses: stateful/vscode-server-action@v1
# if: failure()
# with:
# timeout: '30000'
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ubuntu-logs-${{ matrix.node-version }}
path: |
e2e/wdio/*.log
e2e/*.log
e2e/browser-runner/logs
e2e-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.x
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
- name: Lint / Typings / Unit / Smoke / Component Tests
run: npm run test
# disabled tests due to high flakiness
# - name: E2E Protocol Tests
# uses: nick-fields/retry@v3
# with:
# timeout_minutes: 20
# max_attempts: 3
# command: npm run test:e2e
- name: E2E Launch Tests
run: |
npm run test:e2e:edge
npm run test:e2e:webdriver
- name: 🐛 Debug Build
uses: stateful/vscode-server-action@v1
if: failure()
with:
timeout: '30000'
- uses: actions/upload-artifact@v4
if: failure()
with:
name: windows-logs
path: |
e2e/wdio/*.log
e2e/*.log
e2e/browser-runner/logs
e2e-mac:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.x
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup
env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
# disabled tests due to high flakiness
- name: E2E Protocol Tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 3
command: npm run test:e2e
- name: Safari Component Tests
run: npm run test:component
- name: E2E Launch Tests
run: npm run test:e2e:webdriver
- name: E2E Connection Test
run: npm run test:e2e:cloud
if: github.ref == 'refs/heads/main'
env:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
- name: E2E Connection Test w/ Params
run: npm run test:e2e:cloud -- --user $SAUCE_USERNAME_PARAM --key $SAUCE_ACCESS_KEY_PARAM
if: github.ref == 'refs/heads/main'
env:
SAUCE_USERNAME_PARAM: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY_PARAM: ${{secrets.SAUCE_ACCESS_KEY}}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: macos-logs
path: |
e2e/wdio/*.log
e2e/*.log
e2e/browser-runner/logs
- name: 🐛 Debug Build
uses: stateful/vscode-server-action@v1
if: failure()
with:
timeout: '30000'