Skip to content
Merged
Show file tree
Hide file tree
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
46 changes: 46 additions & 0 deletions .github/actions/restore-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Restore Gradle Cache

runs:
using: composite
steps:
- name: Restore Dependencies Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/modules-2/files-2.1/
~/.gradle/caches/modules-2/metadata-2.107/
key: gradle-dependencies-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/*.versions.toml') }}
restore-keys: |
gradle-dependencies-${{ runner.os }}-
- name: Restore Gradle Kotlin DSL Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/kotlin-dsl
key: gradle-kotlin-dsl-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-kotlin-dsl-${{ runner.os }}-
- name: Restore Gradle Transforms Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/transforms
key: gradle-transforms-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-transforms-${{ runner.os }}-
- name: Restore Gradle Generated JARs Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/generated-gradle-jars
key: gradle-generated-gradle-jars-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: |
gradle-generated-gradle-jars-${{ runner.os }}-
- name: Restore Gradle Wrapper Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/wrapper
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: |
gradle-wrapper-${{ runner.os }}-
36 changes: 36 additions & 0 deletions .github/actions/save-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Save Gradle Cache

runs:
using: composite
steps:
- name: Save Dependencies Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/modules-2/files-2.1/
~/.gradle/caches/modules-2/metadata-2.107/
key: gradle-dependencies-${{ runner.os }}-${{ hashFiles('**/*.gradle*', 'gradle/*.versions.toml') }}
- name: Save Gradle Kotlin DSL Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/kotlin-dsl
key: gradle-kotlin-dsl-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
- name: Save Gradle Transforms Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/transforms
key: gradle-transforms-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
- name: Save Gradle Generated JARs Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches/*/generated-gradle-jars
key: gradle-generated-gradle-jars-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties') }}
- name: Save Gradle Wrapper Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/wrapper
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties') }}
16 changes: 2 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- name: Restore Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
uses: ./.github/actions/restore-cache
- name: Export AboutLibraries library definitions
# Used to run only once
if: matrix.variant == 'debug'
Expand Down Expand Up @@ -100,10 +93,5 @@ jobs:
if: ${{ matrix.variant == 'release' }}
run: ./gradlew :android-app:assembleRelease $CI_GRADLE_ARG_PROPERTIES
- name: Save Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: ./.github/actions/save-cache
if: github.event_name != 'pull_request'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
32 changes: 4 additions & 28 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- name: Restore Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
uses: ./.github/actions/restore-cache
- name: Run Debug Android Lints
run: ./gradlew lintDebug $CI_GRADLE_ARG_PROPERTIES --continue
- name: Upload reports
Expand All @@ -67,13 +60,8 @@ jobs:
path: |
**/build/reports/**/*.*
- name: Save Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: ./.github/actions/save-cache
if: github.event_name != 'pull_request'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}

detekt:
name: Detekt
Expand Down Expand Up @@ -107,14 +95,7 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- name: Restore Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
uses: ./.github/actions/restore-cache
- name: Run Detekt
run: ./gradlew detekt $CI_GRADLE_ARG_PROPERTIES
- name: Upload reports
Expand All @@ -124,13 +105,8 @@ jobs:
path: |
**/build/reports/**/*.*
- name: Save Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: ./.github/actions/save-cache
if: github.event_name != 'pull_request'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}

# Only run codestyle report comments on PRs from this repository instead of a fork
# Fork PRs should check for the run result instead
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,13 @@ jobs:
distribution: 'temurin'
java-version: '21'
- name: Restore Cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
uses: ./.github/actions/restore-cache
- name: Run all tests
# -Pandroid.enableBuildConfigAsBytecode=false due to https://issuetracker.google.com/issues/363031540
run: ./gradlew allTests :koverXmlReport -Pandroid.enableBuildConfigAsBytecode=false $CI_GRADLE_ARG_PROPERTIES
- name: Save Cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: ./.github/actions/save-cache
if: github.event_name != 'pull_request'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
Expand Down
Loading