Skip to content

Commit

Permalink
Retrigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Rd4dev committed Aug 11, 2024
1 parent 257f467 commit 6eeb0ae
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 93 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ jobs:

- uses: actions/download-artifact@v4
- name: coverage-report-artifact
run: |
ls -R
echo "SHA256 hash of downloaded files:"
find . -type f -exec sha256sum {} \;
# run: |
# ls -R
# echo "SHA256 hash of downloaded files:"
# find . -type f -exec sha256sum {} \;

- name: Filter Coverage Reports
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,95 +68,95 @@ fun main(vararg args: String) {
println("Coverage Report Container1: $coverageReportContainer")





// Process coverage report files
val coverageResultList2 = filePathList.mapNotNull { filePath ->
println("Single Path: $filePath")
val filePathNew = filePath.removePrefix("./")
println("Single Path After removing prefix: $filePathNew")

try {
val path = Paths.get(repoRoot, filePathNew)
Files.newInputStream(path).use { stream ->
CoverageReport.newBuilder().also { builder ->
builder.mergeFrom(stream)
}.build()
}
/*File(repoRoot, filePath).inputStream().use { stream ->
CoverageReport.newBuilder().also { builder ->
builder.mergeFrom(stream)
}.build()
}*/
} catch (e: Exception) {
println("Error processing file $filePath: ${e.message}")
null
}
}

// Create CoverageReportContainer and print it
val coverageReportContainer2 = CoverageReportContainer.newBuilder().apply {
addAllCoverageReport(coverageResultList2)
}.build()

println("Coverage Report Container2: $coverageReportContainer2")





val coverageResultList3 = mutableListOf<CoverageReport>()

filePathList.forEach { filePath ->
val file = File(filePath)
if (file.exists()) {
file.inputStream().use { stream ->
val coverageReport = CoverageReport.newBuilder().also { builder ->
builder.mergeFrom(stream)
}.build()
coverageResultList3.add(coverageReport)
}
} else {
println("File does not exist: $filePath")
}
}

val coverageReportContainer3 = CoverageReportContainer.newBuilder().apply {
addAllCoverageReport(coverageResultList3)
}.build()

println("Coverage Report Container3: $coverageReportContainer3")



val coverageResultList4 = mutableListOf<CoverageReport>()

filePathList.forEach { filePath ->
println("Single Path: $filePath")
val filePathNew = filePath.removePrefix("./")
println("Single Path After removing prefix: $filePathNew")
val file = File(filePathNew)
if (file.exists()) {
File(filePathNew).inputStream().use { stream ->
val cvr = CoverageReport.newBuilder().also { builder ->
builder.mergeFrom(stream)
}.build()
coverageResultList4.add(cvr)
}
} else {
println("File does not exist: $filePathNew")
}
}

// Create CoverageReportContainer and print it
val coverageReportContainer4 = CoverageReportContainer.newBuilder().apply {
addAllCoverageReport(coverageResultList3)
}.build()

println("Coverage Report Container3: $coverageReportContainer4")


//
//
//
// // Process coverage report files
// val coverageResultList2 = filePathList.mapNotNull { filePath ->
// println("Single Path: $filePath")
// val filePathNew = filePath.removePrefix("./")
// println("Single Path After removing prefix: $filePathNew")
//
// try {
// val path = Paths.get(repoRoot, filePathNew)
// Files.newInputStream(path).use { stream ->
// CoverageReport.newBuilder().also { builder ->
// builder.mergeFrom(stream)
// }.build()
// }
// /*File(repoRoot, filePath).inputStream().use { stream ->
// CoverageReport.newBuilder().also { builder ->
// builder.mergeFrom(stream)
// }.build()
// }*/
// } catch (e: Exception) {
// println("Error processing file $filePath: ${e.message}")
// null
// }
// }
//
// // Create CoverageReportContainer and print it
// val coverageReportContainer2 = CoverageReportContainer.newBuilder().apply {
// addAllCoverageReport(coverageResultList2)
// }.build()
//
// println("Coverage Report Container2: $coverageReportContainer2")
//
//
//
//
//
// val coverageResultList3 = mutableListOf<CoverageReport>()
//
// filePathList.forEach { filePath ->
// val file = File(filePath)
// if (file.exists()) {
// file.inputStream().use { stream ->
// val coverageReport = CoverageReport.newBuilder().also { builder ->
// builder.mergeFrom(stream)
// }.build()
// coverageResultList3.add(coverageReport)
// }
// } else {
// println("File does not exist: $filePath")
// }
// }
//
// val coverageReportContainer3 = CoverageReportContainer.newBuilder().apply {
// addAllCoverageReport(coverageResultList3)
// }.build()
//
// println("Coverage Report Container3: $coverageReportContainer3")
//
//
//
// val coverageResultList4 = mutableListOf<CoverageReport>()
//
// filePathList.forEach { filePath ->
// println("Single Path: $filePath")
// val filePathNew = filePath.removePrefix("./")
// println("Single Path After removing prefix: $filePathNew")
// val file = File(filePathNew)
// if (file.exists()) {
// File(filePathNew).inputStream().use { stream ->
// val cvr = CoverageReport.newBuilder().also { builder ->
// builder.mergeFrom(stream)
// }.build()
// coverageResultList4.add(cvr)
// }
// } else {
// println("File does not exist: $filePathNew")
// }
// }
//
// // Create CoverageReportContainer and print it
// val coverageReportContainer4 = CoverageReportContainer.newBuilder().apply {
// addAllCoverageReport(coverageResultList3)
// }.build()
//
// println("Coverage Report Container3: $coverageReportContainer4")
//
//



Expand Down

0 comments on commit 6eeb0ae

Please sign in to comment.