diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b3b0b477b..f664708f8 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -23,8 +23,18 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4.2.2 - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.9.1 + - name: Cache Bazel + uses: actions/cache@v4 + with: + path: ~/.cache/bazel + key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl') }} + + - name: Setup Bazel with cache + uses: bazel-contrib/setup-bazel@0.15.0 + with: + disk-cache: true + repository-cache: true + bazelisk-cache: true - name: Run formatting checks run: | bazel run //src:ide_support diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab0984abb..33c4f4d23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,20 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4.2.2 + - name: Cache Bazel and pip + uses: actions/cache@v4 + with: + path: | + ~/.cache/bazel + ~/.cache/pip + key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl', 'src/requirements.txt', 'src/**/*.py') }} + + - name: Setup Bazel with cache + uses: bazel-contrib/setup-bazel@0.15.0 + with: + disk-cache: true + repository-cache: true + bazelisk-cache: true - name: Run test targets run: | bazel run //src:ide_support