blob: cd2a81d7b733ac2f5a3a0e2df513c212b8935c1d [file] [edit]
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 the Format job in ci.yml.
lint:
name: Lint
uses: ./.github/workflows/bazel.yml
with:
name: Lint
run: bazel test //javascript/selenium-webdriver:eslint-test
# Tests on 22.23.4 (earliest supported version) are run in smoke and RBE.
# This job covers the latest supported version.
unit-tests:
name: Unit Tests
if: github.event_name == 'schedule' || !inputs.smoke
uses: ./.github/workflows/bazel.yml
strategy:
fail-fast: false
matrix:
node-version: ['26.12.1']
os: [ubuntu]
with:
name: Unit Tests (${{ matrix.node-version }}, ${{ matrix.os }})
os: ${{ matrix.os }}
node-version: ${{ matrix.node-version }}
run: bazel test //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
--config=gh-browser
${{ inputs.compile-manager && '--manager=host' || '' }}
--test_tag_filters=${{ matrix.tag_filters }}${{ matrix.os == 'macos' && github.event_name == 'pull_request' && ',-edge' || '' }}
--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
--config=gh-browser
--test_tag_filters=${{ matrix.tag_filters }},-os-sensitive,-se-manager
//javascript/selenium-webdriver/...