From 84de7bd771190a99e68919100f2eef3e901b1784 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Mon, 9 Jun 2025 09:35:28 +0200 Subject: [PATCH 1/3] Add GitHub Actions CI workflow for automated testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Run tests on push and pull requests to master/main - Use Java 21 with Temurin distribution - Include Gradle caching for faster builds - Upload test results as artifacts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e2a83ba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + cache-cleanup: on-success + + - name: Make gradlew executable + run: chmod +x gradlew + + - name: Run tests + run: ./gradlew test + + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: build/reports/tests/test/ \ No newline at end of file From 705d2c04e12bcff39e5aa7ceb8605da73bfe042d Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Mon, 9 Jun 2025 09:56:09 +0200 Subject: [PATCH 2/3] Fix test execution by adding JUnit platform and mocking dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add useJUnitPlatform() to enable Spock test discovery - Add byte-buddy, mockito-core, and objenesis for Java class mocking - All 52 tests now pass (100% success rate) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index 4f8a815..006ed69 100644 --- a/build.gradle +++ b/build.gradle @@ -30,6 +30,11 @@ dependencies { testImplementation('org.spockframework:spock-core:2.4-M6-groovy-4.0') { exclude group: 'org.codehaus.groovy' } + + // Mocking libraries required by Spock for Java class mocking + testImplementation 'net.bytebuddy:byte-buddy:1.14.8' + testImplementation 'org.mockito:mockito-core:5.7.0' + testImplementation 'org.objenesis:objenesis:3.3' } version = '1.3' @@ -95,3 +100,7 @@ def isSetupForDeployToMavenCentral() { } // TODO: Update to use maven-publish plugin syntax + +test { + useJUnitPlatform() +} From d06c84c94370d2d23a25c03db1f5cc2ae675dd3a Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Tue, 10 Jun 2025 21:07:57 +0200 Subject: [PATCH 3/3] Update version to 1.4-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 006ed69..51e7516 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ dependencies { testImplementation 'org.objenesis:objenesis:3.3' } -version = '1.3' +version = '1.4-SNAPSHOT' group = 'com.xlson.groovycsv' sourceSets {