I'm trying to set up Space automation to run and upload my code coverage to Qodana cloud.
I can run the coverage and see it in Qodana locally from Intellij, but I'm struggling to find how I can do this with Space automation. It will analyse my code, but not the code coverage.
This is my space automation script
.space.kts
job("Qodana") {
startOn {
gitPush {
anyBranchMatching {
+"main"
}
}
codeReviewOpened{}
}
container("jetbrains/qodana-jvm") {
env["QODANA_TOKEN"] = "{{ project:qodana-token }}"
shellScript {
content = "qodana"
}
}
}
and my qodana.yaml
version: "1.0"
#Specify inspection profile for code analysis
profile:
name: qodana.recommended
#Enable inspections
include:
- name: CheckDependencyLicenses
projectJDK: 17 #(Applied in CI/CD pipeline)
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-jvm:latest
What am I missing?
I finally figured this out. Two problems I had:
To implement this I ended up with this
.space.kts
file