diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 11f3cd2e0..55e4e9dc5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,6 +20,7 @@ jobs: with: java-version: 25 distribution: temurin + cache: gradle - name: Spotless Check run: ./gradlew spotlessCheck javadoc: @@ -31,6 +32,7 @@ jobs: with: java-version: 25 distribution: temurin + cache: gradle - name: Javadoc CheckStyle run: ./gradlew checkstyleMain - name: Javadoc Check @@ -50,6 +52,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: temurin + cache: gradle - name: Build and Run Tests shell: bash run: | @@ -77,6 +80,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: temurin + cache: gradle - name: Build and Run Tests shell: bash run: | @@ -97,6 +101,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: temurin + cache: gradle - name: Build and Run Tests shell: bash run: | @@ -120,6 +125,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: temurin + cache: gradle - name: Build and Run Tests shell: bash run: | diff --git a/.github/workflows/publish-snapshots.yml b/.github/workflows/publish-snapshots.yml index b51897b04..9cbf6e32f 100644 --- a/.github/workflows/publish-snapshots.yml +++ b/.github/workflows/publish-snapshots.yml @@ -20,11 +20,12 @@ jobs: contents: write steps: + - uses: actions/checkout@v6 - uses: actions/setup-java@v4 with: distribution: temurin # Temurin is a distribution of adoptium java-version: 25 - - uses: actions/checkout@v6 + cache: gradle - name: Load secret uses: 1password/load-secrets-action@v4 diff --git a/.github/workflows/test-api-consistency.yml b/.github/workflows/test-api-consistency.yml index 769580401..86e2a7b3e 100644 --- a/.github/workflows/test-api-consistency.yml +++ b/.github/workflows/test-api-consistency.yml @@ -18,10 +18,11 @@ jobs: uses: actions/checkout@v6 - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} + cache: gradle - name: Run API Consistency Tests run: ./gradlew test --tests "org.opensearch.flowframework.workflow.*" diff --git a/.github/workflows/test_bwc.yml b/.github/workflows/test_bwc.yml index 48f595c5e..1a05fc1d2 100644 --- a/.github/workflows/test_bwc.yml +++ b/.github/workflows/test_bwc.yml @@ -20,14 +20,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout Flow Framework + uses: actions/checkout@v6 + - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} - - - name: Checkout Flow Framework - uses: actions/checkout@v6 + cache: gradle - name: Assemble Flow Framework run: | diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml index 7be57a232..dbb4e3d31 100644 --- a/.github/workflows/test_security.yml +++ b/.github/workflows/test_security.yml @@ -42,6 +42,7 @@ jobs: with: distribution: 'temurin' java-version: ${{ matrix.java }} + cache: gradle - name: Run tests # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 309a68e75..3fdb252aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) - Fix hard-coded region in Bedrock template URLs ([#1354](https://github.com/opensearch-project/flow-framework/pull/1354)) - Add missing fields to workflow steps matching ml-commons builders ([#1360](https://github.com/opensearch-project/flow-framework/pull/1360)) ### Infrastructure +- Add Gradle cache to setup-java steps in GitHub Actions workflows ([#1372](https://github.com/opensearch-project/flow-framework/pull/1372)) ### Documentation ### Maintenance ### Refactoring