2024-03-21 19:49:34 +03:00
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-04-22 13:07:21 +03:00
|
|
|
name: Check
|
|
|
|
|
|
|
|
on:
|
2022-12-16 17:13:55 +03:00
|
|
|
pull_request:
|
|
|
|
branches: [ master, stable-* ]
|
2021-04-22 13:07:21 +03:00
|
|
|
|
2022-12-16 14:24:03 +03:00
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
2023-06-08 14:58:40 +03:00
|
|
|
concurrency:
|
|
|
|
group: check-kotlin-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-04-22 13:07:21 +03:00
|
|
|
jobs:
|
2022-12-16 17:13:55 +03:00
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
task: [ detekt, ktlintCheck ]
|
|
|
|
steps:
|
2024-10-23 18:53:06 +03:00
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2023-04-14 20:20:30 +03:00
|
|
|
- name: Set up JDK 17
|
2024-09-24 17:19:56 +03:00
|
|
|
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
|
2022-12-16 17:13:55 +03:00
|
|
|
with:
|
|
|
|
distribution: "temurin"
|
2023-04-14 20:20:30 +03:00
|
|
|
java-version: 17
|
2022-12-16 17:13:55 +03:00
|
|
|
- name: Check ${{ matrix.task }}
|
|
|
|
run: ./gradlew ${{ matrix.task }}
|