ci: Run KTLint (#1825)

* ci: Run ktlint

* Update validate-android.yml

* Update validate-android.yml

* Update validate-android.yml

* Use correct path

* test: Use wrong Kotlin formatting

* Use checkout@v4

* Revert "test: Use wrong Kotlin formatting"

This reverts commit 282c23be9c40506f20f99f56f7166ea2fc8d45aa.
This commit is contained in:
Marc Rousavy 2023-09-21 19:06:33 +02:00 committed by GitHub
parent a417be6292
commit 115140d01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,12 +60,23 @@ jobs:
uses: yutailang0119/action-android-lint@v3
with:
report-path: package/android/build/reports/*.xml
# ktlint:
# name: Kotlin Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Run KTLint
# uses: mrousavy/action-ktlint@v1.7
# with:
# github_token: ${{ secrets.github_token }}
ktlint:
name: Kotlin Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.0/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
- name: run ktlint
working-directory: ./package/android/
run: |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml --relative --editorconfig=./.editorconfig
continue-on-error: true
- uses: yutailang0119/action-ktlint@v3
with:
report-path: ./package/android/build/*.xml
continue-on-error: false
- uses: actions/upload-artifact@v3
with:
name: ktlint-report
path: ./package/android/build/*.xml