Repository navigation
113 lines (107 loc) · 3.49 KB
/
Copy pathci-javascript.yml
File metadata and controls
113 lines (107 loc) · 3.49 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
112
113
name: CI - JavaScript
on:
workflow_call:
inputs:
smoke:
description: Smoke tests always run; callers pass false to add the full matrix
required: false
type: boolean
default: true
compile-manager:
description: Build Selenium Manager from source instead of downloading the pinned binary
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
smoke:
description: Smoke tests only (default also runs the full matrix)
required: false
type: boolean
default: false
compile-manager:
description: Build Selenium Manager from source instead of downloading the pinned binary
required: false
type: boolean
default: false
permissions:
contents: read
# RBE runs the Linux x86_64 tests; these jobs cover macOS and Windows.
jobs:
# Prettier is checked by ci-lint.yml.
lint:
name: Lint
uses: ./.github/workflows/bazel.yml
with:
name: Lint
run: bazel test //javascript/selenium-webdriver:eslint-test
unit-tests:
name: Unit Tests
if: github.event_name == 'schedule' || !inputs.smoke
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
node-version: ['24.14.1']
os: [ubuntu]
with:
name: Unit Tests (${{ matrix.node-version }}, ${{ matrix.os }})
os: ${{ matrix.os }}
node-version: ${{ matrix.node-version }}
run: bazel test --local_test_jobs 1 //javascript/selenium-webdriver:small-tests
smoke:
name: ${{ matrix.os }}-smoke
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
os: [macos, windows]
tag_filters: ['unit,os-sensitive,se-manager']
# macOS runners are scarce, so only use for PRs and nightly runs
exclude:
- os: ${{ github.event_name == 'push' && 'macos' || '' }}
with:
name: ${{ matrix.os }}
needs-display: true
os: ${{ matrix.os }}
rerun-with-debug: true
download-artifact-name: targets
run: >
[ -s bazel-targets-js.txt ] || echo //javascript/selenium-webdriver/... > bazel-targets-js.txt;
./scripts/github-actions/bazel-test-if-targets.sh
--keep_going
--flaky_test_attempts 3
--local_test_jobs 1
--build_tests_only
--skip_incompatible_explicit_targets
--pin_browsers=false
${{ inputs.compile-manager && '--manager=host' || '' }}
--test_env=SE_FORCE_BROWSER_DOWNLOAD=true
--test_env=SE_SKIP_DRIVER_IN_PATH=true
--test_tag_filters=${{ matrix.tag_filters }}
--target_pattern_file=bazel-targets-js.txt
os-tests-full:
name: ${{ matrix.os }}-full
if: github.event_name == 'schedule' || !inputs.smoke
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
os: [windows]
tag_filters: ['chrome,-remote', 'firefox,-remote', 'edge', 'chrome-remote', 'firefox-remote']
with:
name: (${{ matrix.tag_filters }})
needs-display: true
os: ${{ matrix.os }}
rerun-with-debug: true
run: >
bazel test
--keep_going
--flaky_test_attempts 3
--local_test_jobs 1
--build_tests_only
--pin_browsers=false
--test_env=SE_FORCE_BROWSER_DOWNLOAD=true
--test_env=SE_SKIP_DRIVER_IN_PATH=true
--test_tag_filters=${{ matrix.tag_filters }},-os-sensitive,-se-manager
//javascript/selenium-webdriver/...