Skip to content

Update kotlin monorepo #3527

Update kotlin monorepo

Update kotlin monorepo #3527

Workflow file for this run

name: Test
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
build:
strategy:
matrix:
# Windows checks are temporarily disabled until fixed, see: https://github.com/cashapp/sqldelight/issues/2579
os: [ macOS-latest, ubuntu-latest ]
job: [ instrumentation, test, gradle-plugin-tests ]
exclude:
- os: windows-latest
job: instrumentation
- os: windows-latest
job: gradle-plugin-tests
runs-on: ${{matrix.os}}
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
distribution: 'zulu'
java-version: 17
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Run spotless
run: ./gradlew spotlessCheck
- name: Assemble parallel
run: ./gradlew assemble
# Linux tests
- name: Run gradle tests
if: matrix.os == 'ubuntu-latest' && matrix.job == 'test'
run: |
./gradlew build -x :sqldelight-idea-plugin:build -x :sqldelight-gradle-plugin:test --stacktrace -x linuxX64Test
- name: Run gradle plugin tests
if: matrix.os == 'ubuntu-latest' && matrix.job == 'gradle-plugin-tests'
run: ./gradlew :sqldelight-gradle-plugin:test :sqldelight-gradle-plugin:grammarkitTest
- name: Run the IntelliJ plugin
if: matrix.os == 'ubuntu-latest' && matrix.job == 'instrumentation'
run: ./gradlew :sqldelight-idea-plugin:build --stacktrace
- name: Verify IntelliJ plugin
if: matrix.os == 'ubuntu-latest' && matrix.job == 'instrumentation'
run: ./gradlew :sqldelight-idea-plugin:runPluginVerifier
# Windows tests
- name: Run windows tests
if: matrix.os == 'windows-latest'
run: ./gradlew mingwX64Test sqldelight-idea-plugin:check --stacktrace
- name: Run linux tests
if: matrix.os == 'ubuntu-latest'
# not parallel otherwise NativeTransacterTest fails.
run: ./gradlew linuxX64Test --no-parallel
# iOS tests
- name: Run instrumentation tests
if: matrix.os == 'macOS-latest' && matrix.job == 'instrumentation'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: ./gradlew connectedCheck :sqldelight-gradle-plugin:build --stacktrace -PInstrumentation
- name: Run ios tests
if: matrix.os == 'macOS-latest' && matrix.job == 'test'
run: ./gradlew iosX64Test --stacktrace
# Build the sample
- name: Build the sample
if: matrix.os == 'macOS-latest' && matrix.job == 'gradle-plugin-tests'
uses: gradle/gradle-build-action@v2
with:
arguments: kotlinUpgradeYarnLock build --stacktrace
build-root-directory: sample
env:
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true