Skip to content

Commit

Permalink
github actions: use gradle/gradle-build-action to setup gradle and re…
Browse files Browse the repository at this point in the history
…move cache action (too big so never loaded)

Signed-off-by: Vincent Gramer <[email protected]>
  • Loading branch information
vgramer committed Feb 7, 2024
1 parent 3c7c5e1 commit de71b67
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 33 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/release_and_pulbish_plugin_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ jobs:
ORG_GRADLE_PROJECT_publishChannel: stable
ORG_GRADLE_PROJECT_publishToken: ${{ secrets.PUBLISH_TOKEN }}
steps:
# # Cache gradle dependencies
# - uses: actions/cache@v2
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
# restore-keys: |
# ${{ runner.os }}-gradle-

- uses: actions/checkout@v4
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: corretto

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true

- name: publish plugin
run: |
Expand Down
29 changes: 8 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,11 @@ jobs:
java-version: 17
distribution: corretto

# Cache gradle dependencies
- uses: actions/cache@v2
# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
gradle-home-cache-cleanup: true

- name: Download OPA
run: |
Expand Down Expand Up @@ -76,24 +70,17 @@ jobs:
java-version: 17
distribution: corretto

# Cache gradle dependencies
- uses: actions/cache@v2
# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
gradle-home-cache-cleanup: true

- uses: actions/cache@v2
with:
path: ~/.pluginVerifier/ides
key: ${{ runner.os }}-plugin-verifier-ides

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Verify plugin binary compatibility
run: ./gradlew :plugin:runPluginVerifier

Expand Down

0 comments on commit de71b67

Please sign in to comment.