-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (44 loc) · 1.23 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
45
46
47
48
49
50
51
52
53
54
name: ci
on:
push:
branches:
- main
workflow_dispatch:
inputs:
tmate_debug:
description: 'Run tmate for debugging'
type: boolean
required: false
default: false
jobs:
ci:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: bazel cache
uses: actions/cache@v2
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: ${{ runner.os }}-${{ github.ref }}
- name: checkout
uses: actions/checkout@v2
- name: tmate debugging
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tmate_debug && always() }}
- name: build and test
run: bazel test //... --config ci
- name: test gazelle invariance
run: bazel run //:gazelle -- --mode=diff --strict
- name: build and test for example
run: bazel test //...
working-directory: ./example
- name: test gazelle invariance for example
run: bazel run //:gazelle -- --mode=diff --strict
working-directory: ./example