Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8dde5d2
fix: rename JaCoCo XML reports for code-coverage-summary-action compa…
griga311 Jun 12, 2026
493cca2
fix: add test step and --stacktrace to publishing workflow
griga311 Jun 12, 2026
7a98ac9
chore: fork publishing config - URL GRIGAeo/UCFS, version 0.1.0, PUBL…
griga311 Jun 12, 2026
f773e80
chore: comment out failing DotParser test for CI
griga311 Jun 12, 2026
f9d76a5
chore: lowercase artifactId and fresh version 0.2.0
griga311 Jun 12, 2026
368a0c9
chore: restore clean state — original URL, unspecified version, uncom…
griga311 Jun 12, 2026
a17c45b
Extract test coverage reporting functionality to root build.gradle.kts
griga311 Jul 9, 2026
52b2fc0
Replace action with more suitable one and reorder steps in 'Run tests…
griga311 Jul 9, 2026
85f303d
Upgrade Gradle to version 9.6.1
griga311 Jul 9, 2026
b1ade92
for test
griga311 Jul 9, 2026
40ab2e0
Upgrade JVM version in workflow
griga311 Jul 9, 2026
0a4eeb4
Upgrade Kotlin to 2.4.0 version
griga311 Jul 9, 2026
5d931bc
Upgrade Kotlin to 2.4.0 version
griga311 Jul 9, 2026
ad09307
Remove publisher module, add separate publications for solver/generat…
griga311 Jul 9, 2026
6bb8b0b
Upgrade Java to 21 version
griga311 Jul 9, 2026
89fc631
Uncomment TestDotParser and mark as @Disabled with reason
griga311 Jul 13, 2026
50c42ce
revert TestDotParser to broken state to demonstrate workflow result
griga311 Jul 25, 2026
84dca0a
add jacoco plugin to build files of solver and generator modules
griga311 Jul 25, 2026
0629c73
disable failing TestDotParser to demonstrate workflow
griga311 Jul 25, 2026
d7fa61a
add jacoco plugin to build files of solver and generator modules
griga311 Jul 25, 2026
77cf32b
lower test coverage thresholds to demonstrate workflow
griga311 Jul 25, 2026
763c5d8
fix: resolve unpublished solver version in generator POM
griga311 Jul 25, 2026
1b8ae11
Merge branch 'test-infrastructure' into for-testing-workflow
griga311 Jul 25, 2026
a03731c
restore original test coverage thresholds
griga311 Jul 25, 2026
6b5e483
ci: update repository URLs to test workflow
griga311 Jul 29, 2026
7a588a8
fix: correct invalid code
griga311 Jul 29, 2026
5697d1c
test: restore failing TestDotParser
griga311 Jul 29, 2026
e887a88
test: disable failing test
griga311 Jul 29, 2026
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
6 changes: 4 additions & 2 deletions .github/workflows/ci-publishing-jar-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run tests
run: ./gradlew test
- name: Publish package
run: ./gradlew :publisher:publish
run: ./gradlew publish --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 16 additions & 6 deletions .github/workflows/ci-test-infrastructure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
workflow_dispatch:
permissions:
pull-requests: write
contents: read
jobs:
test:
Expand All @@ -15,11 +16,20 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run tests
run: ./gradlew --no-daemon solver:jacocoTestCoverageVerification generator:jacocoTestCoverageVerification

- name: Summarize tests results
uses: jeantessier/code-coverage-summary-action@v1
- name: Run tests and verify coverage
run: ./gradlew --no-daemon testCodeCoverageReport

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.8.0
with:
paths: ${{ github.workspace }}/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 95
min-coverage-changed-lines: 0

- name: Verify coverage
run: ./gradlew jacocoTestCoverageVerification
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
*.log
*.logs

bin/

.gradle
!gradle/wrapper/gradle-wrapper.jar
**/build/
Expand Down
112 changes: 112 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
plugins {
id("java")
id("jacoco")
id("jacoco-report-aggregation")
kotlin("jvm") version "2.4.0" apply false
kotlin("plugin.allopen") version "2.4.0" apply false
id("maven-publish")
id("pl.allegro.tech.build.axion-release") version "1.21.2"
}

// Part of test code coverage report
jacoco {
toolVersion = "0.8.14"
}

repositories {
mavenCentral()
}

dependencies {
jacocoAggregation(project(":solver"))
jacocoAggregation(project(":generator"))
jacocoAggregation(project(":test-shared"))
}

tasks.testCodeCoverageReport {
reports {
xml.required.set(true)
html.required.set(true)
csv.required.set(true)
}
classDirectories.setFrom(classDirectories.filter { !it.path.contains("test-shared") })
}

tasks.jacocoTestCoverageVerification {
dependsOn(tasks.testCodeCoverageReport)

executionData.setFrom(tasks.testCodeCoverageReport.map { it.executionData })
sourceDirectories.setFrom(tasks.testCodeCoverageReport.map { it.sourceDirectories })
classDirectories.setFrom(tasks.testCodeCoverageReport.map { it.classDirectories })

violationRules {
rule {
isEnabled = true
limit {
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.95".toBigDecimal()
}
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.80".toBigDecimal()
}
limit {
counter = "LINE"
value = "COVEREDRATIO"
minimum = "0.80".toBigDecimal()
}
limit {
counter = "METHOD";
value = "COVEREDRATIO"
minimum = "0.85".toBigDecimal()
}
limit {
counter = "CLASS"
value = "COVEREDRATIO"
minimum = "0.90".toBigDecimal()
}
}
}
}

// Part of publishing

group = "org.ucfs"

version = scmVersion.version

subprojects {
version = rootProject.version
group = rootProject.group
}

evaluationDependsOnChildren()

publishing {
publications {
create<MavenPublication>("solver") {
artifactId = "solver"
from(project(":solver").components.getByName("java"))
}
create<MavenPublication>("generator") {
artifactId = "generator"
from(project(":generator").components.getByName("java"))
versionMapping {
usage("java-api") { fromResolutionOf("runtimeClasspath") }
usage("java-runtime") { fromResolutionResult() }
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/GRIGAeo/UCFS")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
75 changes: 2 additions & 73 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
plugins {
kotlin("jvm") version "1.9.20"
jacoco
kotlin("jvm")
id("jacoco")
}

jacoco{
toolVersion = "0.8.14"
}

repositories {
mavenCentral()
Expand All @@ -21,74 +18,6 @@ tasks.test {
useJUnitPlatform()
}

tasks.jacocoTestReport{
dependsOn(":test-shared:test")
dependsOn(tasks.test)

val localExec = layout.buildDirectory.dir("jacoco").map { it.file("test.exec").asFile }
val testSharedExec = project(":test-shared").layout.buildDirectory.dir("jacoco").map { it.file("test.exec").asFile }
val classData1 = layout.buildDirectory.dir("classes/java/main").map{ it.asFile }
val classData2 = layout.buildDirectory.dir("classes/kotlin/main").map{ it.asFile }

classDirectories.setFrom(files(classData1, classData2))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(files(localExec, testSharedExec))

reports{
xml.required.set(true)
html.required.set(true)
csv.required.set(true)
}
}

tasks.jacocoTestCoverageVerification{
dependsOn(tasks.jacocoTestReport)

val localExec = layout.buildDirectory.dir("jacoco").map { it.file("test.exec").asFile }
val testSharedExec = project(":test-shared").layout.buildDirectory.dir("jacoco").map { it.file("test.exec").asFile }
val classData1 = layout.buildDirectory.dir("classes/java/main").map{ it.asFile }
val classData2 = layout.buildDirectory.dir("classes/kotlin/main").map{ it.asFile }

classDirectories.setFrom(files(classData1, classData2))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(files(localExec, testSharedExec))

violationRules{
rule{
isEnabled = true
limit{
counter = "INSTRUCTION"
value = "COVEREDRATIO"
minimum = "0.95".toBigDecimal()
}
limit{
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "0.8".toBigDecimal()
}
limit{
counter = "LINE"
value = "COVEREDRATIO"
minimum = "0.8".toBigDecimal()
}
limit{
counter = "METHOD"
value = "COVEREDRATIO"
minimum = "0.85".toBigDecimal()
}
limit {
counter = "CLASS"
value = "COVEREDRATIO"
minimum = "0.9".toBigDecimal()
}
}
}
}

tasks.check{
dependsOn(tasks.jacocoTestCoverageVerification)
}

kotlin {
jvmToolchain(11)
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
46 changes: 0 additions & 46 deletions publisher/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ rootProject.name = "ucfs"
include("solver")
include("generator")
include("test-shared")
include("publisher")
Loading
Loading