Skip to content

test: add e2e workflow#77

Open
shabaraba wants to merge 1 commit intomasterfrom
ci/e2e-workflow
Open

test: add e2e workflow#77
shabaraba wants to merge 1 commit intomasterfrom
ci/e2e-workflow

Conversation

@shabaraba
Copy link
Member

@shabaraba shabaraba commented Mar 2, 2026

Why

Set up CI infrastructure to enable automated E2E testing of kintone-java-client on GitHub Actions.

What

  • Add GitHub Actions workflow (e2e.yml)
    • Triggers on push/PR to master and manual dispatch
    • Supports running specific test classes via workflow_dispatch parameter
  • Add E2E test Gradle project (e2e-tests/)
    • Builds root project and uses the resulting JAR
    • bin/run-test.sh: Builds client → copies JAR → runs tests
    • bin/update-client-jar.sh: Utility to update JAR only
  • Add placeholder test (DummyTest.java) to verify workflow execution

How to test

Run locally:

cd e2e-tests
./bin/run-test.sh

CI workflow verification requires merge and configured Secrets.

Checklist

  • Read CONTRIBUTING.md at the repository.
  • Updated documentation if it is required.
  • Added/updated tests if it is required. (or tested manually)

# KINTONE_BASE_URL - テストに使うkintoneのURL
# KINTONE_DEFAULT_USER / KINTONE_DEFAULT_PASSWORD - デフォルトユーザー認証情報
# KINTONE_TEST_USER / KINTONE_TEST_PASSWORD - テストユーザー認証情報
# KINTONE_SPACE_ID 等 - 詳細は .env.example を参照
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.exampleは後続で入ります

@shabaraba shabaraba marked this pull request as ready for review March 2, 2026 03:03
Copilot AI review requested due to automatic review settings March 2, 2026 03:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Sets up initial CI scaffolding for running end-to-end (E2E) tests for this Java client on GitHub Actions by introducing a dedicated e2e-tests/ Gradle project and an Actions workflow to execute it.

Changes:

  • Added a new GitHub Actions workflow to run E2E tests on push/PR to master and via manual dispatch (with optional test-class filtering).
  • Introduced a standalone e2e-tests/ Gradle project (including its own Gradle wrapper) plus helper scripts to build/copy the client jar and run tests.
  • Added a placeholder JUnit test to validate the workflow wiring.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/e2e.yml Adds an Actions workflow to run the E2E test project and optionally filter to a specific test class.
e2e-tests/src/test/java/com/kintone/client/DummyTest.java Adds a placeholder JUnit test to validate CI execution.
e2e-tests/build.gradle Defines dependencies and test configuration for the E2E Gradle project.
e2e-tests/settings.gradle Declares the E2E project name.
e2e-tests/bin/run-test.sh Script to build the client jar and execute E2E tests.
e2e-tests/bin/update-client-jar.sh Script intended to rebuild/copy the client jar for E2E usage.
e2e-tests/.gitignore Ignores local env/jar artifacts and Gradle build outputs for the E2E project.
e2e-tests/gradlew Adds Gradle wrapper script for the E2E project.
e2e-tests/gradlew.bat Adds Gradle wrapper script for Windows for the E2E project.
e2e-tests/gradle/wrapper/gradle-wrapper.properties Pins the Gradle distribution used by the E2E project wrapper.
e2e-tests/gradle/wrapper/gradle-wrapper.jar Adds the Gradle wrapper jar for the E2E project.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

implementation files('kintone-java-client.jar')
implementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1'
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client jar depends on org.slf4j:slf4j-api (see root build.gradle), but this E2E project doesn’t include it. Since kintone-java-client.jar is not a fat jar, running real E2E tests will likely fail with NoClassDefFoundError: org/slf4j/Logger when client classes load. Add slf4j-api (same version as the main project) to the E2E project dependencies.

Suggested change
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1'
implementation 'org.slf4j:slf4j-api:1.7.36'

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new E2E Gradle wrapper uses Gradle 8.5, while the repository root wrapper is pinned to Gradle 7.5.1 (gradle/wrapper/gradle-wrapper.properties). Using two Gradle major versions in one repo increases maintenance and can lead to subtle CI differences; consider aligning the E2E wrapper to the same Gradle version unless there’s a specific need for 8.x here.

Suggested change
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants