Skip to content

Internal change.

Internal change. #534

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
concurrency:
# Only the runs of a pull request are cancelled by a newer commit. The runs on
# main are not (each one has its own group): each commit is tested, and the
# runs save the caches restored by the pull request runs.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# Job names: "build-and-test (<python>)" on Linux and
# "build-and-test-macos (<python>)" on macOS (arm64). Those names are
# referenced by "github_check_runs" in copy.bara.sky.
build-and-test:
name: build-and-test${{ matrix.os == 'macos-15' && '-macos' || '' }} (${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-15"]
python-version: ["3.11", "3.12", "3.13"]
steps:
# Actions must be pinned to a commit hash (Google GitHub org policy).
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
# Build, test, and Bazel cache handling (shared with nightly.yml and
# release.yml).
- name: Build and test
uses: ./.github/actions/build-and-test
with:
python-version: ${{ matrix.python-version }}