• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Java CI with Bazel
2
3on:
4  push:
5    branches: [ "master" ]
6  pull_request:
7    branches: [ "master" ]
8
9jobs:
10  build:
11    runs-on: ubuntu-latest
12
13    steps:
14    - uses: actions/checkout@v1
15
16    - name: Mount bazel cache
17      uses: actions/cache@v1
18      with:
19        path: "/home/runner/.cache/bazel"
20        key: bazel
21
22    - name: Install bazelisk
23      run: |
24        curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
25        mkdir -p "${GITHUB_WORKSPACE}/bin/"
26        mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
27        chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
28
29    - name: Build
30      run: |
31        "${GITHUB_WORKSPACE}/bin/bazel" build //...
32
33    - name: Test
34      run: |
35        "${GITHUB_WORKSPACE}/bin/bazel" test //...
36