name: CI - RBE

on:
  pull_request:
  push:
    branches:
      - trunk
  workflow_dispatch:

jobs:
  format:
    name: Format
    if: github.repository_owner == 'seleniumhq'
    uses: ./.github/workflows/bazel.yml
    with:
      name: Check format script run
      caching: false
      ruby-version: jruby-9.4.5.0
      run: ./scripts/github-actions/check-format.sh

  test:
    name: Test
    if: github.repository_owner == 'seleniumhq'
    uses: ./.github/workflows/bazel.yml
    with:
      name: All RBE tests
      caching: false
      ruby-version: jruby-9.4.5.0
      run: ./scripts/github-actions/ci-build.sh
