From 43784e50c542dbf573f3b8a43ce45dfe9f7a9e8c Mon Sep 17 00:00:00 2001 From: Hanna Kurhuzenkava Date: Fri, 22 Mar 2024 16:44:11 +0300 Subject: [PATCH] MAIN-T-92 Add Qodana to pipeline --- .github/workflows/gradle.yml | 14 ------------- .space.kts | 38 +++--------------------------------- 2 files changed, 3 insertions(+), 49 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 69ec2bd3..2b15fa48 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,20 +10,6 @@ defaults: jobs: -# qodana: -# 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' -# - name: 'Qodana Scan' -# uses: JetBrains/qodana-action@v2023.3 -# env: -# QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} - unit: runs-on: ubuntu-latest permissions: diff --git a/.space.kts b/.space.kts index 6d36dcca..250d9ca7 100644 --- a/.space.kts +++ b/.space.kts @@ -13,35 +13,6 @@ import java.time.temporal.TemporalAdjusters val gradleImageVersion = "gradle:8.2-jdk17" -job("Check Qodana Settings") { - val sharedCoveragePath = "coverage" - container(displayName = "Unit tests", image = gradleImageVersion) { - workDir = "server" - shellScript { - content = """ - ./gradlew koverVerify - mkdir ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath - cd build/kover/bin-reports - cp -a . ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath - cd ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath - ls -la - """.trimIndent() - } - } - - container("jetbrains/qodana-jvm:latest") { - env["QODANA_TOKEN"] = "{{ project:qodana-token }}" - shellScript { - content = """ - qodana \ - --project-dir server \ - --profile-name qodana.recommended \ - --coverage-dir ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath - """.trimIndent() - } - } -} - job("Tests for main branch") { startOn { gitPush { @@ -52,7 +23,7 @@ job("Tests for main branch") { } val sharedCoveragePath = "coverage" - container(displayName = "Unit tests", image = gradleImageVersion) { + container(displayName = "Unit tests with coverage", image = gradleImageVersion) { workDir = "server" shellScript { content = """ @@ -64,19 +35,16 @@ job("Tests for main branch") { ls -la """.trimIndent() } -// kotlinScript { api -> -// api.gradlew("koverVerify") -// } } - container("jetbrains/qodana-jvm:latest") { + container(displayName = "Qodana scan", image = "jetbrains/qodana-jvm:latest") { env["QODANA_TOKEN"] = "{{ project:qodana-token }}" shellScript { content = """ qodana \ --project-dir server \ --profile-name qodana.recommended \ - -v ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath:/data/coverage + --coverage-dir ${'$'}JB_SPACE_FILE_SHARE_PATH/$sharedCoveragePath """.trimIndent() } }