forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (108 loc) · 3.2 KB
/
javascript.yml
File metadata and controls
111 lines (108 loc) · 3.2 KB
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
name: JavaScript workflow
on:
workflow_dispatch:
push:
branches:
- trunk
paths:
- .bazel*
- .github/actions/**
- .github/workflows/javascript.yml
- javascript/**
- common/**
- package.json
- package-lock.json
pull_request:
branches:
- trunk
paths:
- .bazel*
- .github/actions/**
- .github/workflows/javascript.yml
- javascript/**
- common/**
- package.json
- package-lock.json
jobs:
node_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-node-tests-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-node-tests-
${{ runner.os }}-bazel-build-
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 15
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Firefox and geckodriver
uses: ./.github/actions/setup-firefox
- name: Start XVFB
run: Xvfb :99 &
- name: Run JavaScript tests on Firefox
uses: ./.github/actions/bazel
with:
command: test //javascript/node/selenium-webdriver:tests
env:
DISPLAY: :99
SELENIUM_BROWSER: firefox
firefox_atom_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v2
- name: Cache Bazel artifacts
uses: actions/cache@v2
with:
path: |
~/.cache/bazel-disk
~/.cache/bazel-repo
key: ${{ runner.os }}-bazel-atom-firefox-tests-${{ hashFiles('**/BUILD.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-atom-firefox-tests-
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup bazelisk
uses: ./.github/actions/setup-bazelisk
- name: Setup Firefox and geckodriver
uses: ./.github/actions/setup-firefox
- name: Start XVFB
run: Xvfb :99 &
- name: Run atom tests on Firefox
uses: ./.github/actions/bazel
with:
command: test --test_tag_filters=firefox //javascript/atoms/... //javascript/selenium-atoms/... //javascript/webdriver/...
env:
DISPLAY: :99
SELENIUM_BROWSER: firefox
# As soon as this gets merged https://github.com/facebook/jest/pull/9351, we should upgrade Jest and
# run bazel test javascript/grid-ui:test for these tests
grid_ui_unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout source tree
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '15.x'
- name: NPM install
run: cd javascript/grid-ui && npm install
- name: Run unit tests
run: cd javascript/grid-ui && npm test