From 451c963fd531eb840a7df1dbe5e0d419baed59c6 Mon Sep 17 00:00:00 2001 From: Aaron Ai Date: Thu, 25 Aug 2022 08:42:16 +0800 Subject: [PATCH] Enable dependency caching for coverage (#4880) --- .github/workflows/bazel.yml | 4 ++-- .github/workflows/coverage.yml | 3 ++- .github/workflows/maven.yaml | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 8f9e7e4eeb7..e251655e0fb 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -1,4 +1,4 @@ -name: Build and Run Tests By Bazel +name: Build and Run Tests by Bazel on: pull_request_target: types: [opened, reopened, synchronize] @@ -9,7 +9,7 @@ on: - bazel jobs: build: - name: "Java (${{ matrix.os }})" + name: "bazel-compile (${{ matrix.os }})" runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index eda87fcf747..81db2a656cb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -14,8 +14,9 @@ jobs: with: java-version: "8" distribution: "adopt" + cache: "maven" - name: Generate coverage report - run: mvn -B test --file pom.xml + run: mvn -B test -T 2C --file pom.xml - name: Upload to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 66fed022a74..3165dedcc62 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -1,4 +1,4 @@ -name: Build and Run Tests By Maven +name: Build and Run Tests by Maven on: pull_request: types: [opened, reopened, synchronize] @@ -20,6 +20,6 @@ jobs: with: java-version: ${{ matrix.jdk }} distribution: "adopt" - cache: maven + cache: "maven" - name: Build with Maven - run: mvn -B package -T 1C --file pom.xml + run: mvn -B package -T 2C --file pom.xml