From 245e9516141f6fef353a0c6cc6867fe1c1d095a7 Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 7 Apr 2023 12:15:37 +0300 Subject: [PATCH] fix: Minor fixes --- .../api-single-module-v2-workflow.yml | 38 +++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/.github/workflows/api-single-module-v2-workflow.yml b/.github/workflows/api-single-module-v2-workflow.yml index c06ce54..c5bc52b 100644 --- a/.github/workflows/api-single-module-v2-workflow.yml +++ b/.github/workflows/api-single-module-v2-workflow.yml @@ -29,21 +29,19 @@ on: type: boolean jobs: - api-single-module-workflow: + sonar-check: + name: SonarQube check runs-on: custom steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK 17 uses: actions/setup-java@v1 with: java-version: 17 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build and analyze (exclude test) if: ${{ !inputs.IS_TEST_ENABLED }} env: @@ -51,7 +49,7 @@ jobs: GITHUB_USERNAME: ${{ secrets.GH_USER_CAN_READ_PACKAGES || secrets.GH_DEPBOT_USER_CAN_READ_PACKAGES }} SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }} - run: ./gradlew build bootJar sonar --info -x test + run: ./gradlew build sonar --info -x test - name: Build and analyze (include test) if: ${{ inputs.IS_TEST_ENABLED }} @@ -60,7 +58,33 @@ jobs: GITHUB_USERNAME: ${{ secrets.GH_USER_CAN_READ_PACKAGES || secrets.GH_DEPBOT_USER_CAN_READ_PACKAGES }} SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }} - run: ./gradlew build bootJar test sonar --info + run: ./gradlew build test sonar --info + + api-single-module-workflow: + runs-on: custom + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build application + if: ${{ !inputs.IS_TEST_ENABLED }} + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CAN_READ_PACKAGES || secrets.GH_DEPBOT_TOKEN_CAN_READ_PACKAGES }} + GITHUB_USERNAME: ${{ secrets.GH_USER_CAN_READ_PACKAGES || secrets.GH_DEPBOT_USER_CAN_READ_PACKAGES }} + run: ./gradlew bootJar + + - name: Build and test application + if: ${{ inputs.IS_TEST_ENABLED }} + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CAN_READ_PACKAGES || secrets.GH_DEPBOT_TOKEN_CAN_READ_PACKAGES }} + GITHUB_USERNAME: ${{ secrets.GH_USER_CAN_READ_PACKAGES || secrets.GH_DEPBOT_USER_CAN_READ_PACKAGES }} + run: ./gradlew bootJar test - name: Copy docker directory if: ${{ inputs.IS_COPY_DOCKER_DIRECTORY }}