diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 708de1bcb5f..996142c2984 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -81,12 +81,12 @@ jobs: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - - name: Cache Maven Packages - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Create and Switch to Release Branch run: | @@ -172,12 +172,12 @@ jobs: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - - name: Cache Maven Packages - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Reset main to release branch run: | diff --git a/.github/workflows/grpc-api.yml b/.github/workflows/grpc-api.yml index 198214ee788..d1be76d5e52 100644 --- a/.github/workflows/grpc-api.yml +++ b/.github/workflows/grpc-api.yml @@ -29,16 +29,10 @@ jobs: - name: Install JDK uses: actions/setup-java@v2 with: + cache: 'maven' distribution: 'adopt' java-version: 11 - - name: Cache dependencies - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-m2-${{ hashFiles('./pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 - - name: Maven verify run: ./mvnw ${MAVEN_CLI_OPTS} verify -pl "${MODULE}" --also-make -Dspring.profiles.active=${{ matrix.schema }} working-directory: . diff --git a/.github/workflows/importer.yml b/.github/workflows/importer.yml index d66be481950..c7e01461425 100644 --- a/.github/workflows/importer.yml +++ b/.github/workflows/importer.yml @@ -29,16 +29,10 @@ jobs: - name: Install JDK uses: actions/setup-java@v2 with: + cache: 'maven' distribution: 'adopt' java-version: 11 - - name: Cache dependencies - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-m2-${{ hashFiles('./pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 - - name: Maven verify run: ./mvnw ${MAVEN_CLI_OPTS} verify -pl "${MODULE}" --also-make -Dspring.profiles.active=${{ matrix.schema }} working-directory: . diff --git a/.github/workflows/monitor.yml b/.github/workflows/monitor.yml index 092c3ead9d2..e1901e6aff9 100644 --- a/.github/workflows/monitor.yml +++ b/.github/workflows/monitor.yml @@ -26,16 +26,10 @@ jobs: - name: Install JDK uses: actions/setup-java@v2 with: + cache: 'maven' distribution: 'adopt' java-version: 11 - - name: Cache dependencies - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-m2-${{ hashFiles('./pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 - - name: Maven verify run: ./mvnw ${MAVEN_CLI_OPTS} verify -pl "${MODULE}" --also-make -Dtest='!com.hedera.mirror.importer.**' -DfailIfNoTests=false working-directory: . diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index f6a034ab85c..cd230fd1fda 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -12,12 +12,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Cache Maven packages - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Login to Google Container Registry uses: google-github-actions/setup-gcloud@master diff --git a/.github/workflows/release-production.yml b/.github/workflows/release-production.yml index 518ab3b8c23..d3f0eea8f1f 100644 --- a/.github/workflows/release-production.yml +++ b/.github/workflows/release-production.yml @@ -13,12 +13,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Cache Maven packages - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Login to Google Container Registry uses: google-github-actions/setup-gcloud@master diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 477327a5157..f83883d77bf 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -18,12 +18,12 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Cache Maven dependencies - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Vulnerability check run: ./mvnw ${MAVEN_CLI_OPTS} dependency-check:aggregate @@ -38,12 +38,12 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Cache Maven dependencies - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Cache SonarCloud dependencies uses: actions/cache@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 929366545b2..ac1c0343ac7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,17 +12,13 @@ jobs: runs-on: windows-2019 steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: '11' - - name: Cache Maven packages - uses: actions/cache@v2 + - name: Install JDK + uses: actions/setup-java@v2 with: - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - path: ~/.m2 - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' + distribution: 'adopt' + java-version: 11 - name: Maven package run: ./mvnw.cmd package --batch-mode --no-transfer-progress -DskipTests