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

use the official Gradle GHA #914

Merged
merged 7 commits into from Sep 5, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 18 additions & 32 deletions .github/workflows/gradle.yml
Expand Up @@ -24,31 +24,22 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Gradle Dependencies Cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}

- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}

- name: Run tests with Gradle
uses: eskatos/gradle-command-action@v1
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
test
--stacktrace
-Pkotlin.version=${{ matrix.kotlin-version }}
cache-read-only: false

- name: Run tests with Gradle
run: |
./gradlew check
Copy link
Contributor Author

@aSemy aSemy Sep 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also changed ./gradlew test to ./gradlew check, because I noticed that the API dumps are not up to date. The apiCheck task will run if the check task runs, not test.

--stacktrace
-Pkotlin.version=${{ matrix.kotlin-version }}
-Pkotlin.ir.enabled=${{ matrix.kotlin-ir-enabled }}
-PjavaToolchainTestVersion=${{ matrix.java-version }}

Expand All @@ -67,17 +58,10 @@ jobs:
distribution: adopt
java-version: 11

- name: Setup Gradle Dependencies Cache
uses: actions/cache@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}

- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
cache-read-only: false

- name: AVD cache
uses: actions/cache@v3
Expand All @@ -99,7 +83,9 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck
run: |
./gradlew connectedCheck
--stacktrace
-Pkotlin.version=${{ matrix.kotlin-version }}
-Pkotlin.ir.enabled=${{ matrix.kotlin-ir-enabled }}
-PjavaToolchainTestVersion=${{ matrix.java-version }}