Skip to content

Add property to disable ktlint for a glob in '.editorconfig' (#2108) #88

Add property to disable ktlint for a glob in '.editorconfig' (#2108)

Add property to disable ktlint for a glob in '.editorconfig' (#2108) #88

# name must be identical to name of 'pull-request-without-code'
name: Pull request
on:
push:
branches: ['master']
paths:
- '**/*.kt'
- '**/*.kts'
- '**/*.properties'
- '**/*.toml'
pull_request:
paths:
- '**/*.kt'
- '**/*.kts'
- '**/*.properties'
- '**/*.toml'
workflow_dispatch:
env:
ORG_GRADLE_PROJECT_signingKey : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
ORG_GRADLE_PROJECT_signingKeyPassword : ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
CLI_TEST_MAX_DURATION_IN_SECONDS: 10
# Note that "jobs.build.strategy" and "jobs.build.runs-on" should be kept in sync with "pull-request-wth-code"
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
# When changing the list of JDK versions, the build configuration has to be changed by a repository admin. See
# https://github.com/pinterest/ktlint/pull/1787#issuecomment-1409074092
jdk: [ 8, 11, 17, 19 ]
exclude: # windows with JDK8 are *really* flaky
- os: windows-latest
jdk: 8
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Build with release Kotlin version
run: ./gradlew build ktlintCheck --no-configuration-cache
- name: Build with dev Kotlin version
run: ./gradlew -PkotlinDev build ktlintCheck --no-configuration-cache