Skip to content

Skip dokkaHtml task in PR tests #5024

Skip dokkaHtml task in PR tests

Skip dokkaHtml task in PR tests #5024

Workflow file for this run

name: Test
on:
pull_request:
# Ensure paths-ignore match paths in PR-skip.yml
paths-ignore:
- 'docs/**'
- '*.md'
- 'mkdocs.yml'
jobs:
spotless:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.ci-java-version
- run: ./gradlew spotlessCheck
build:
strategy:
# Ensure any changes to the matrix are also made in PR-skip.yml
matrix:
os: [ macOS-14, windows-latest, ubuntu-latest ]
job: [ instrumentation, test, gradle-plugin-tests ]
exclude:
- os: windows-latest
job: instrumentation
- os: windows-latest
job: gradle-plugin-tests
- os: ubuntu-latest
job: gradle-plugin-tests
- os: macOS-14
job: instrumentation
runs-on: ${{matrix.os}}
permissions:
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.ci-java-version
- name: Setup gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
# 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 -x dokkaHtml
- name: Run gradle plugin tests
if: matrix.os == 'macOS-14' && matrix.job == 'gradle-plugin-tests'
run: ./gradlew :sqldelight-gradle-plugin:test :sqldelight-gradle-plugin:grammarkitTest --parallel -x dokkaHtml
- name: Run the IntelliJ plugin
if: matrix.os == 'ubuntu-latest' && matrix.job == 'instrumentation'
run: ./gradlew :sqldelight-idea-plugin:build --stacktrace -x dokkaHtml
# 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 -x dokkaHtml
# android tests
- name: Enable KVM group perms
if: matrix.os == 'ubuntu-latest' && matrix.job == 'instrumentation'
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run instrumentation tests
if: matrix.os == 'ubuntu-latest' && matrix.job == 'instrumentation'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: ./gradlew connectedCheck :sqldelight-gradle-plugin:instrumentationTest --stacktrace --parallel -x dokkaHtml
# ios tests
- name: Run ios tests
if: matrix.os == 'macOS-14' && matrix.job == 'test'
run: ./gradlew iosX64Test --stacktrace --parallel
- name: Check for changed files
run: test -z "$(git status --porcelain)"
verify_intellij:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
# https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
idea:
- 'IC-2023.2.5' # IC / Iguana
- 'IC-2024.1' # IC
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.ci-java-version
- run: ./gradlew -DideaVersion=${{matrix.idea}} :sqldelight-idea-plugin:runPluginVerifier
verify_intellij_check:
runs-on: ubuntu-latest
needs: verify_intellij
steps:
- name: Success!
run: echo "All IntelliJ plugin verification checks passed!"
buildSample:
runs-on: macos-14
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.ci-java-version
- uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- run: ./gradlew -p sample build --stacktrace --parallel
buildWebSample:
runs-on: macos-14
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.ci-java-version
- uses: gradle/actions/setup-gradle@v4
with:
gradle-home-cache-cleanup: true
- run: ./gradlew -p sample-web kotlinUpgradeYarnLock build --stacktrace --parallel
env:
GRADLE_OPTS: -Dorg.gradle.caching=true