-
Notifications
You must be signed in to change notification settings - Fork 38
33 lines (31 loc) · 1.14 KB
/
test.yml
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
name: Test
on:
# Test on checkin.
push:
branches: [ master ]
# Pull requests
pull_request:
branches: [ master ]
# Nightly test.
schedule:
- cron: '0 */2 * * *'
# Manual trigger.
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- uses: actions/cache@v4
name: Setup Bazel Cache
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }}-go-${{ hashFiles('go.sum') }}-npm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }}-go-${{ hashFiles('go.sum') }}-npm-${{ hashFiles('pnpm-lock.yaml') }}
${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }}-go-${{ hashFiles('go.sum') }}
${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }}
${{ runner.os }}-bazel-
- run: bazel build ...
- run: bazel test --test_output=errors ...