-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.29 KB
/
presubmit.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Presubmit checks for PRs
name: "presubmit"
on:
# Trigger on pull request rather than push, so that we can control whether
# checks are run on a given PR (allowing checks to run automatically on PR
# updates from third parties can be a security issue).
pull_request:
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: true
jobs:
bazel-builder:
# TODO(scott): Move to CI runners
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: restore bazel cache
uses: actions/cache/restore@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-bazel-${{ github.ref }}
restore-keys: |
${{ runner.os }}-bazel-
- name: run all tests
run: |
bazel test --config=presubmit //...
- name: save bazel cache
uses: actions/cache/save@v4
with:
path: "~/.cache/bazel"
key: ${{ runner.os }}-bazel-${{ github.ref }}
golang-builder:
# TODO(scott): Move to CI runners
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build all
run: |
go build ./...
- name: run all tests
run: |
go test ./...