diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0e0ce7c..999dd82 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,12 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + - name: Look up cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.cache + key: ${{ github.repository }}-${{ github.job }}-${{ matrix.bazel-version }}-${{ runner.os }}-${{ hashFiles('.bazelrc', 'WORKSPACE', 'MODULE.bazel') }} + restore-keys: ${{ github.repository }}-${{ github.job }}-${{ matrix.bazel-version }}-${{ runner.os }}- - name: Set up uses: ./.github/actions/setup with: @@ -63,6 +69,12 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + - name: Look up cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/examples/.cache + key: ${{ github.repository }}-${{ github.job }}-${{ matrix.bazel-version }}-${{ runner.os }}-${{ hashFiles('.bazelrc', 'WORKSPACE', 'MODULE.bazel', 'examples/.bazelrc', 'examples/WORKSPACE', 'examples/MODULE.bazel') }} + restore-keys: ${{ github.repository }}-${{ github.job }}-${{ matrix.bazel-version }}-${{ runner.os }}- - name: Set up uses: ./.github/actions/setup with: @@ -73,15 +85,23 @@ jobs: style-check: runs-on: ubuntu-latest + env: + bazel-version: 7.x steps: - name: Checkout uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + - name: Look up cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.cache + key: ${{ github.repository }}-${{ github.job }}-${{ env.bazel-version }}-${{ runner.os }}-${{ hashFiles('.bazelrc', 'WORKSPACE', 'MODULE.bazel') }} + restore-keys: ${{ github.repository }}-${{ github.job }}-${{ env.bazel-version }}-${{ runner.os }}- - name: Set up uses: ./.github/actions/setup with: - bazel-version: 7.x + bazel-version: ${{ env.bazel-version }} - name: Run formatters and linters shell: bash run: ./development/cli/style_check.bash