From 1c54683929cd6940bb54a985e8c88a44cb777bc4 Mon Sep 17 00:00:00 2001 From: Jesus Recio Date: Tue, 17 Dec 2024 12:34:25 +0100 Subject: [PATCH] feat: set up to run detekt over all the modules in parallel --- .github/workflows/detekt.yml | 74 ++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/.github/workflows/detekt.yml b/.github/workflows/detekt.yml index efc259ff36b..79445c53c7c 100644 --- a/.github/workflows/detekt.yml +++ b/.github/workflows/detekt.yml @@ -21,6 +21,7 @@ on: push: branches: - feature/detekt + - feature/run_actions_parallel pull_request: branches: - "master" @@ -30,11 +31,9 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "greet" - run: + owncloudApp: # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - uses: actions/checkout@v4 @@ -50,11 +49,80 @@ jobs: uses: gradle/actions/setup-gradle@v4 - name: module owncloudApp run: ./gradlew detekt + + owncloudDomain: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: module owncloudDomain run: ./gradlew owncloudDomain:detekt + + owncloudData: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: module owncloudData run: ./gradlew owncloudData:detekt + + owncloudComLibrary: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: module owncloudComLibrary run: ./gradlew owncloudComLibrary:detekt + + + owncloudTestUtil: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: module owncloudTestUtil run: ./gradlew owncloudTestUtil:detekt