mirror of
https://github.com/SeleniumHQ/selenium.git
synced 2026-03-29 06:30:33 +00:00
132 lines
4.1 KiB
YAML
132 lines
4.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- trunk
|
|
schedule:
|
|
- cron: "0 */12 * * *"
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
if: >
|
|
github.event.repository.fork == false &&
|
|
(startsWith(github.head_ref, 'renovate/') != true || github.event_name == 'workflow_call')
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
targets: ${{ steps.check-targets.outputs.bazel-targets }}
|
|
steps:
|
|
- name: Checkout source tree
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 50
|
|
- name: Setup Bazel
|
|
uses: bazel-contrib/setup-bazel@0.15.0
|
|
with:
|
|
bazelisk-cache: true
|
|
cache-version: 2
|
|
external-cache: |
|
|
name: ci-check
|
|
manifest:
|
|
crates: rust/Cargo.Bazel.lock
|
|
rules_ruby~~ruby~ruby: rb/.ruby-version
|
|
repository-cache: false
|
|
- name: Check Bazel targets
|
|
id: check-targets
|
|
run: ./scripts/github-actions/check-bazel-targets.sh
|
|
env:
|
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha || github.event.before }}...${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
dotnet:
|
|
name: .NET
|
|
needs: check
|
|
uses: ./.github/workflows/ci-dotnet.yml
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//dotnet') ||
|
|
contains(join(github.event.commits.*.message), '[dotnet]') ||
|
|
contains(github.event.pull_request.title, '[dotnet]')
|
|
|
|
java:
|
|
name: Java
|
|
needs: check
|
|
uses: ./.github/workflows/ci-java.yml
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//java') ||
|
|
contains(join(github.event.commits.*.message), '[java]') ||
|
|
contains(github.event.pull_request.title, '[java]')
|
|
|
|
python:
|
|
name: Python
|
|
needs: check
|
|
uses: ./.github/workflows/ci-python.yml
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//py') ||
|
|
contains(join(github.event.commits.*.message), '[py]') ||
|
|
contains(github.event.pull_request.title, '[py]')
|
|
|
|
ruby:
|
|
name: Ruby
|
|
needs: check
|
|
uses: ./.github/workflows/ci-ruby.yml
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//rb') ||
|
|
contains(join(github.event.commits.*.message), '[rb]') ||
|
|
contains(github.event.pull_request.title, '[rb]')
|
|
|
|
rust:
|
|
name: Rust
|
|
needs: check
|
|
uses: ./.github/workflows/ci-rust.yml
|
|
secrets:
|
|
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//rust') ||
|
|
contains(join(github.event.commits.*.message), '[rust]') ||
|
|
contains(github.event.pull_request.title, '[rust]')
|
|
|
|
javascript:
|
|
name: JavaScript
|
|
needs: check
|
|
uses: ./.github/workflows/ci-javascript.yml
|
|
with:
|
|
targets: ${{ needs.check.outputs.targets }}
|
|
run-full-suite: >-
|
|
${{
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(github.event.pull_request.title, '[js]')
|
|
}}
|
|
if: >
|
|
github.event_name == 'schedule' ||
|
|
github.event_name == 'workflow_dispatch' ||
|
|
github.event_name == 'workflow_call' ||
|
|
contains(needs.check.outputs.targets, '//javascript/selenium-webdriver/') ||
|
|
contains(github.event.pull_request.title, '[js]')
|