Skip to content

Commit

Permalink
MAIN-T-92 Add Qodana to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
hanna-eismant committed Mar 22, 2024
1 parent 267254d commit 43784e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
# env:
# QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

unit:
runs-on: ubuntu-latest
permissions:
Expand Down
38 changes: 3 additions & 35 deletions .space.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 = """
Expand All @@ -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()
}
}
Expand Down

0 comments on commit 43784e5

Please sign in to comment.