Skip to content

chore(deps): update actions/checkout action to v4 #331

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #331

Workflow file for this run

name: CI
"on": [push, pull_request, workflow_dispatch]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
bazel-version: ["5.x", "6.x", "latest"]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/cache@v3
with:
path: "~/.cache/bazelisk\n~/.cache/bazel\n"
key: py${{ matrix.python-version }}-bazel-${{ matrix.bazel-version }}-cache-${{ github.run_id }}
restore-keys: py${{ matrix.python-version }}-bazel-${{ matrix.bazel-version }}-cache-
- name: Set things up for the Python version to be used
run: |
TO_REPLACE='python_version = "3.11"'
REPLACE_WITH='python_version = "${{ matrix.python-version }}"'
grep -q "${TO_REPLACE}" WORKSPACE
sed --in-place "s/${TO_REPLACE}/${REPLACE_WITH}/" WORKSPACE
bazel run //:requirements.update
- run: sed -i '/remove if Bazel version < 6/d' tests/test.cc
if: ${{ startsWith(matrix.bazel-version, '5') }}
- name: Run tests
run: bazel test --test_env=NO_CLEANUP=1 //...
lint:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: trunk-io/trunk-action@v1