Skip to content

Commit

Permalink
[SHARED] Add gradle cache for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kamgurgul committed Jul 29, 2024
1 parent 0fb38d4 commit 6d7e62c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/android_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Unit tests
run: ./gradlew testDebugUnitTest
- name: Generate code coverage
Expand Down Expand Up @@ -47,6 +56,15 @@ jobs:
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Decode Keystore
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE_ENCODED }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/ios_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Unit tests
run: ./gradlew testDebugUnitTest
build_and_release:
Expand All @@ -42,6 +51,8 @@ jobs:
with:
path: |
~/.konan
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-v1-${{ hashFiles('*.versions.toml') }}
- uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/shared_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ jobs:
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Unit tests
run: ./gradlew testDebugUnitTest
- name: Generate code coverage
Expand Down

0 comments on commit 6d7e62c

Please sign in to comment.