-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (36 loc) · 1.02 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
"on":
push:
branches: [main]
pull_request:
permissions: read-all
jobs:
test:
runs-on: ${{ matrix.os }}
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
strategy:
fail-fast: false
matrix:
bazel-version: ["5.x", "6.x", "7.x"]
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: "~/.cache/bazelisk\n~/.cache/bazel\n"
key: bazel-${{ matrix.bazel-version }}-cache-${{ github.run_id }}
restore-keys: bazel-${{ matrix.bazel-version }}-cache-
- run: sed -i.bak '/enable_bzlmod/d' .bazelrc && rm .bazelrc.bak
if: ${{ matrix.bazel-version == '5.x' }}
- run: bazel test //...
- run: bazel test --enable_bzlmod //...
if: ${{ matrix.bazel-version != '5.x' }}
lint:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: trunk-io/trunk-action@v1