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
Show file tree
Hide file tree
Changes from all 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
42 changes: 11 additions & 31 deletions .github/workflows/gradle.yml
Expand Up @@ -24,33 +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: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run tests with Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: |
test
--stacktrace
-Pkotlin.version=${{ matrix.kotlin-version }}
-Pkotlin.ir.enabled=${{ matrix.kotlin-ir-enabled }}
-PjavaToolchainTestVersion=${{ matrix.java-version }}
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 }}

android-instrumented-tests:
runs-on: macos-latest
Expand All @@ -67,17 +56,8 @@ jobs:
distribution: adopt
java-version: 11

- 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: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: AVD cache
uses: actions/cache@v3
Expand Down
7 changes: 7 additions & 0 deletions build.gradle.kts
Expand Up @@ -11,6 +11,13 @@ plugins {

group = "io.mockk"

apiValidation {
ignoredProjects += listOf(
projects.testModules.performanceTests.name,
projects.testModules.clientTests.name,
)
}

tasks.wrapper {
gradleVersion = "7.5.1"
distributionType = Wrapper.DistributionType.ALL
Expand Down