Skip to content

Internal change.

Internal change. #1796

Workflow file for this run

name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
required: false
jobs:
build:
runs-on: ubuntu-latest
env:
TEST_TMPDIR: '/tmp'
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Configure MODULE.bazel python version
run: |
MATRIX_VER="${{ matrix.python-version }}"
VER_UNDERSCORE="${MATRIX_VER//./_}"
sed -i "s/python_version = \"3.11\"/python_version = \"$MATRIX_VER\"/g" MODULE.bazel
sed -i "s/python_3_11/python_$VER_UNDERSCORE/g" MODULE.bazel
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true
- name: Run tests
run: |
bazel test //...
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.python-version }}
path: bazel-testlogs/