Skip to content

Commit 995415a

Browse files
add caching to some workflows (#95)
1 parent b89fc4f commit 995415a

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/format.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,18 @@ jobs:
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4.2.2
26-
- name: Setup Bazel
27-
uses: bazel-contrib/setup-bazel@0.9.1
26+
- name: Cache Bazel
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.cache/bazel
30+
key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl') }}
31+
32+
- name: Setup Bazel with cache
33+
uses: bazel-contrib/setup-bazel@0.15.0
34+
with:
35+
disk-cache: true
36+
repository-cache: true
37+
bazelisk-cache: true
2838
- name: Run formatting checks
2939
run: |
3040
bazel run //src:ide_support

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ jobs:
2121
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@v4.2.2
24+
- name: Cache Bazel and pip
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cache/bazel
29+
~/.cache/pip
30+
key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl', 'src/requirements.txt', 'src/**/*.py') }}
31+
32+
- name: Setup Bazel with cache
33+
uses: bazel-contrib/setup-bazel@0.15.0
34+
with:
35+
disk-cache: true
36+
repository-cache: true
37+
bazelisk-cache: true
2438
- name: Run test targets
2539
run: |
2640
bazel run //src:ide_support

0 commit comments

Comments
 (0)