Repository navigation
51 lines (43 loc) · 1.81 KB
/
Copy pathbazel-test.yaml
File metadata and controls
51 lines (43 loc) · 1.81 KB
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
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: BazelTest
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
bazel_test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
USE_BAZEL_VERSION: 8.7.0
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true
external-cache: true
# This is maintined internally by the Ink Team at Google and requires periodic rotation
# of these credentials. Googler admins can update the credentials by going to
# https://console.cloud.google.com/iam-admin/serviceaccounts?project=ink-open-source
# deleting the expired key, creating a new key in JSON format, and updating the secret in
# https://github.com/google/ink/settings/secrets/actions. (Follow the corresponding
# instructions for google/ink-stroke-modeler at the same time.)
google-credentials: ${{ (github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == 'google/ink') &&
secrets.GOOGLE_CREDENTIALS || '' }}
- name: Test
run: >
bazel test
${{ (github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == 'google/ink') &&
'--google_default_credentials --remote_cache=https://storage.googleapis.com/ink-open-source-ci/'
|| '' }}
--test_output=errors --keep_going //ink/...