Replace KtLintMultiRule
#7464
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre Merge Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
env: | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }} | |
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }} | |
permissions: | |
contents: read | |
jobs: | |
gradle: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
jdk: [ 8, 11, 17 ] | |
exclude: # windows with JDK8 are *really* flaky | |
- os: windows-latest | |
jdk: 8 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 | |
- name: Setup Java | |
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'temurin' | |
- name: Build detekt | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 | |
with: | |
gradle-home-cache-cleanup: true | |
arguments: build -x detekt publishToMavenLocal -PenablePTS=${{ github.event_name == 'pull_request' }} | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 | |
with: | |
name: heap-dump | |
path: '**.hprof' | |
if-no-files-found: ignore | |
verify-generated-config-file: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 | |
- name: Setup Java | |
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Verify Generated Detekt Config File | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 | |
with: | |
gradle-home-cache-cleanup: true | |
arguments: verifyGeneratorOutput | |
compile-test-snippets: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 | |
- name: Setup Java | |
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Build and compile test snippets | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 | |
with: | |
gradle-home-cache-cleanup: true | |
arguments: test -Pcompile-test-snippets=true | |
warnings-as-errors: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 | |
- name: Setup Java | |
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Run with allWarningsAsErrors | |
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2 | |
with: | |
gradle-home-cache-cleanup: true | |
arguments: compileKotlin compileTestKotlin compileTestFixturesKotlin -PwarningsAsErrors=true |