Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): use setup-gradle to handle cache #2628

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ runs:
with:
distribution: zulu
java-version-file: config/.java-version
cache: gradle

- name: Validate gradle wrapper
if: inputs.type != 'minimal'
uses: gradle/wrapper-validation-action@v1

- name: Setup gradle
if: inputs.type != 'minimal'
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false

- name: Download Java formatter
if: inputs.type != 'minimal'
shell: bash
Expand All @@ -55,12 +60,6 @@ runs:
# let yarn handle the cache hash
key: yarn-cache-${{ env.CACHE_VERSION }}

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: node-modules-${{ env.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}

- name: Install JavaScript dependencies
shell: bash
run: YARN_ENABLE_HARDENED_MODE=0 yarn install
Expand Down Expand Up @@ -152,10 +151,8 @@ runs:
if: ${{ inputs.language == 'kotlin' }}
uses: actions/cache@v4
with:
path: |
clients/algoliasearch-client-kotlin/.gradle
clients/algoliasearch-client-kotlin/client/build/spotless
key: gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('clients/algoliasearch-client-kotlin/build.gradle.kts') }}
path: clients/algoliasearch-client-kotlin/client/build/spotless
key: spotless-${{ env.CACHE_VERSION }}-${{ hashFiles('clients/algoliasearch-client-kotlin/build.gradle.kts') }}

# Dart
- name: Install dart
Expand Down
Loading