Skip to content

Commit 984c139

Browse files
gkdncopybara-github
authored andcommitted
Fix github CI that was accidentally overridden.
PiperOrigin-RevId: 546422214
1 parent 8e0310a commit 984c139

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
name: CI
1818

19+
# Declare default permissions as read only.
20+
permissions: read-all
21+
1922
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
2023
on:
2124
push:
@@ -33,32 +36,32 @@ jobs:
3336
strategy:
3437
fail-fast: false
3538
matrix:
36-
test-type: [CI, SAMPLES]
39+
test-target: ['default', 'samples']
3740
os: [macos-latest, ubuntu-latest]
3841

3942
runs-on: ${{ matrix.os }}
4043

4144
steps:
4245
- name: Setup Java
43-
uses: actions/setup-java@v3
46+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
4447
with:
4548
java-version: '11'
4649
distribution: 'zulu'
4750
java-package: jdk
4851

4952
- name: Checkout current commit
50-
uses: actions/checkout@v3
53+
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
5154

5255
- name: Cache Bazel repositories
53-
uses: actions/cache@v3
56+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
5457
with:
5558
path: ~/bazel-repository-cache
5659
key: bazel-repositories-${{hashFiles('**/WORKSPACE', '**.bzl')}}
5760
restore-keys: |
5861
bazel-repositories-
5962
6063
- name: Cache Bazel results
61-
uses: actions/cache@v3
64+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
6265
with:
6366
path: ~/bazel-action-cache
6467
key: bazel-actions-${{runner.os}}-${{github.sha}}
@@ -72,4 +75,8 @@ jobs:
7275
echo "build --verbose_failures" >> ~/.bazelrc
7376
bazel info
7477
- name: Run tests
75-
run: ./build_test.sh ${{ matrix['test-type'] }}
78+
if: matrix.test-target == 'default'
79+
run: ./build_test.sh CI
80+
- name: Run samples tests
81+
if: matrix.test-target == 'samples'
82+
run: ./build_test_samples.sh CI

0 commit comments

Comments
 (0)