Update detekt to v1.23.7 #739
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: CI | |
on: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ci-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
build-all: | |
runs-on: macos-latest | |
steps: | |
- name: check out | |
uses: actions/checkout@v3 | |
- name: main build | |
uses: ./.github/actions/gradle-task | |
with: | |
task: jar compileKotlin | |
write-cache-key: main-build-artifacts | |
ktlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ktlint | |
uses: ./.github/actions/gradle-task-with-commit | |
with: | |
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
fix-task: ktlintFormat | |
check-task: ktlintCheck | |
dependency-guard: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: dependency-guard | |
uses: ./.github/actions/gradle-task-with-commit | |
with: | |
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
fix-task: dependencyGuardBaseline | |
check-task: dependencyGuard | |
moduleCheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: moduleCheck | |
uses: ./.github/actions/gradle-task-with-commit | |
with: | |
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
fix-task: moduleCheckAuto | |
check-task: moduleCheck | |
check-version-is-snapshot: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: check version is snapshot | |
uses: ./.github/actions/gradle-task | |
with: | |
task: checkVersionIsSnapshot | |
detekt: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: detektAll | |
uses: ./.github/actions/gradle-task | |
with: | |
task: detektAll | |
restore-cache-key: main-build-artifacts | |
- name: merge detekt SARIF reports | |
run: ./gradlew detektReportMerge | |
- name: Upload SARIF to Github using the upload-sarif action | |
uses: github/codeql-action/upload-sarif@v2 | |
if: success() || failure() | |
with: | |
sarif_file: build/reports/detekt/merged.sarif | |
api-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: api-check | |
uses: ./.github/actions/gradle-task-with-commit | |
with: | |
personal-access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
fix-task: apiDump | |
check-task: apiCheck | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ ubuntu, windows ] | |
runs-on: ${{ matrix.runner }}-latest | |
steps: | |
- name: check out | |
uses: actions/checkout@v3 | |
- name: unit tests | |
uses: ./.github/actions/gradle-task | |
with: | |
task: test | |
restore-cache-key: main-build-artifacts | |
- name: Archive test results | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: test-results | |
path: ${{ github.workspace }}/**/build/reports/tests/ | |
- name: Unit test results | |
uses: mikepenz/action-junit-report@v3 | |
if: failure() | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
report_paths: '**/build/**/TEST-*.xml' | |
check_name: Unit Test Results - ${{runner.os}} | |
all-checks: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- api-check | |
- check-version-is-snapshot | |
- dependency-guard | |
- detekt | |
- ktlint | |
- moduleCheck | |
- unit-tests | |
steps: | |
- name: require that all other jobs have passed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |