-
Notifications
You must be signed in to change notification settings - Fork 123
40 lines (38 loc) · 1.14 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "JDK ${{ matrix.java }}"
strategy:
matrix:
java: [8, 11, 15]
runs-on: ubuntu-latest
steps:
# Cancel any previous runs for the same branch that are still running.
- name: 'Cancel previous runs'
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5
with:
access_token: ${{ github.token }}
- name: 'Check out repository'
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- name: 'Cache Bazel dependencies'
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: ~/.cache/bazel/*/*/external
key: bazel-${{ hashFiles('WORKSPACE') }}
restore-keys: |
bazel-
- name: 'Set up JDK ${{ matrix.java }}'
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: 'Test'
shell: bash
run: bazel test --test_output=errors //...