forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (103 loc) · 3.26 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
# 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
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup-full
- name: Dependency Check
run: npm run test:depcheck
- name: Lint / Typings / Unit / Smoke Tests
run: npm run test
- name: Interop Tests
run: |
npm i chromedriver@105
npm run test:e2e:cjs
e2e-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup-full
- name: Lint / Dependencies / Unit / Smoke Tests
run: npm run test
- name: Setup Chrome Browser
uses: browser-actions/setup-chrome@latest
- name: E2E Protocol Tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: npm run test:e2e
- name: E2E Edge Launch Tests
run: npm run test:e2e:edge
- uses: actions/upload-artifact@v3
if: failure()
with:
name: logs
path: |
e2e/wdio/*.log
e2e/*.log
e2e-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci
- name: Bootstrap Packages
run: npm run setup-full
- name: E2E Protocol Tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 20
max_attempts: 3
command: npm run test:e2e
# Disable Firefox tests due to https://github.com/puppeteer/puppeteer/issues/8923
# - name: Setup Firefox
# uses: browser-actions/setup-firefox@latest
# with:
# firefox-version: latest
# - run: |
# export FIREFOX_BINARY=$(which firefox)
# echo "FIREFOX_BINARY=$FIREFOX_BINARY" >> $GITHUB_ENV
# - name: E2E Firefox Launch Tests
# run: npm run test:e2e:firefox
- 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}}