Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CONF-CPC-1413): qodana improve coverage #956

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c64fb58
Updated steps to run if failed
viktorkuts Oct 17, 2024
cdd35ca
Add failing test to tests
viktorkuts Oct 17, 2024
8a39c67
Revert "Add failing test to tests"
viktorkuts Oct 17, 2024
b3fffd9
Separated reports for all services
viktorkuts Oct 17, 2024
9ad9814
Bash script fix
viktorkuts Oct 17, 2024
32de3db
Add dir exists check
viktorkuts Oct 17, 2024
900470f
Suppress cp error
viktorkuts Oct 17, 2024
7077f73
Merge branch 'main' into bug/CONF-CPC-1413_Qodana_Archive_On_Failure
viktorkuts Oct 17, 2024
e87cf07
Step leave sample comment on PR
viktorkuts Oct 18, 2024
4925d1f
HTML file test
viktorkuts Oct 18, 2024
5f547cf
Typos in bash script
viktorkuts Oct 18, 2024
8f4777a
Random delimeter
viktorkuts Oct 18, 2024
87ccc73
Test to view issue comment list response
viktorkuts Oct 18, 2024
ea19ecf
Merge branch 'main' into bug/CONF-CPC-1413_Qodana_Archive_On_Failure
nic5694 Oct 18, 2024
10621bf
Added jacoco-report action step
viktorkuts Oct 19, 2024
da2f219
Fix .yml file
viktorkuts Oct 19, 2024
c9c29cd
Fix xml path that couldn't be reached
viktorkuts Oct 19, 2024
54a679d
Add sample test to test pr comment
viktorkuts Oct 19, 2024
893b615
Debugging report generation action
viktorkuts Oct 19, 2024
3b3f6c5
Changed way report paths are inserted into step
viktorkuts Oct 19, 2024
55020ee
Changed reports path from the qodana dir to the root path
viktorkuts Oct 19, 2024
34df558
Added comment for each service
viktorkuts Oct 19, 2024
b7ccbd4
Revert "Add sample test to test pr comment"
viktorkuts Oct 19, 2024
d9acad2
Fixed typo
viktorkuts Oct 19, 2024
899d300
Added sample tests in all services for pr test
viktorkuts Oct 19, 2024
431bdb0
Clean up unused conditional branch
viktorkuts Oct 19, 2024
6b85dd2
Merge branch 'main' into bug/CONF-CPC-1413_Qodana_Archive_On_Failure
viktorkuts Oct 19, 2024
88abd59
Add 90% min coverage for passing status
viktorkuts Oct 19, 2024
aed1c9c
Revert "Added sample tests in all services for pr test"
viktorkuts Oct 19, 2024
d768830
Fixed yml typos
viktorkuts Oct 19, 2024
12787af
Merge branch 'main' into bug/CONF-CPC-1413_Qodana_Archive_On_Failure
viktorkuts Oct 19, 2024
bcb277f
Downgrade jacoco-reports from 1.7.1 to 1.4
viktorkuts Oct 19, 2024
80c115e
report fix
viktorkuts Oct 19, 2024
4dfb90e
Revert "report fix"
viktorkuts Oct 20, 2024
4071fd9
Revert "Downgrade jacoco-reports from 1.7.1 to 1.4"
viktorkuts Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,34 @@ jobs:
run: ./gradlew build

- name: Create coverage-data directory and copy contents
id: zipreports
if: success() || failure()
run: |
mkdir -p .qodana/code-coverage
cp -R */build/reports/* .qodana/code-coverage/
for service in $(find -maxdepth 1 -type d -name '*service*' -o -name '*gateway*' | sed 's/.\///'); do
if [[ -d "$service/build" && -d "$service/build/reports" ]]; then
cp -R "$service/build/reports" ".qodana/code-coverage/$service"
fi
done

- name: Archive coverage data
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: gradle-coverage-data.zip
name: gradle-coverage-data
path: .qodana/code-coverage

- name: Jacoco PR Comment
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 90
min-coverage-changed-files: 90
title: Jacoco Coverage Report
update-comment: true
continue-on-error: true

# - name: 'Qodana Scan'
# uses: JetBrains/[email protected]
# env:
Expand Down
4 changes: 4 additions & 0 deletions api-gateway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions auth-service-outdated/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions auth-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions billing-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions cart-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions customers-service-reactive/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions customers-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions inventory-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions products-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jacocoTestReport {
fileTree(dir: it)
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions vet-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions vets-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
4 changes: 4 additions & 0 deletions visits-service-new/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,5 +502,4 @@ public Mono<VisitResponseDTO> patchVisitStatusInVisit(String visitId, String sta
.flatMap(entityDtoUtil::toVisitResponseDTO);
}


}
4 changes: 4 additions & 0 deletions visits-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ jacocoTestReport {
])
}))
}

reports {
xml.required = true
}
}

jacocoTestCoverageVerification {
Expand Down
Loading