|
| 1 | +# Contributor Quickstart Guide |
| 2 | + |
| 3 | +## Repository Layout |
| 4 | +- `temporal-sdk`: core SDK implementation. |
| 5 | +- `temporal-testing`: utilities to help write workflow and activity tests. |
| 6 | +- `temporal-test-server`: in-memory Temporal server for fast tests. |
| 7 | +- `temporal-serviceclient`: gRPC client for communicating with the service. |
| 8 | +- `temporal-shaded`: prepackaged version of the SDK with shaded dependencies. |
| 9 | +- `temporal-spring-boot-autoconfigure`: Spring Boot auto configuration. |
| 10 | +- `temporal-kotlin`: Kotlin DSL for the SDK. |
| 11 | +- `temporal-opentracing`: OpenTracing interceptor integration. |
| 12 | + |
| 13 | +## General Guidance |
| 14 | +- Avoid changing public API signatures. Anything under an `internal` directory |
| 15 | + is not part of the public API and may change freely. |
| 16 | +- The SDK code is written for Java 8. |
| 17 | + |
| 18 | +## Building and Testing |
| 19 | +1. Format the code before committing: |
| 20 | + ```bash |
| 21 | + ./gradlew --offline spotlessApply |
| 22 | + ``` |
| 23 | +2. Run the tests. This can take a long time so you may prefer to run individual tests. |
| 24 | + ```bash |
| 25 | + ./gradlew test |
| 26 | + ``` |
| 27 | + To run only the core SDK tests or a single test: |
| 28 | + ```bash |
| 29 | + ./gradlew :temporal-sdk:test --offline --tests "io.temporal.workflow.*" |
| 30 | + ./gradlew :temporal-sdk:test --offline --tests "<package.ClassName>" |
| 31 | + ``` |
| 32 | +3. Build the project: |
| 33 | + ```bash |
| 34 | + ./gradlew clean build |
| 35 | + ``` |
| 36 | + |
| 37 | +## Tests |
| 38 | +- All tests for this each package is located in `$PACKAGE_NAME/src/test/java/io/temporal`, where `$PACKAGE_NAME` is the name of the package |
| 39 | +- Workflow API tests should rely on `SDKTestWorkflowRule` to create a worker and |
| 40 | + register workflows, activities, and nexus services. |
| 41 | + |
| 42 | +## Commit Messages and Pull Requests |
| 43 | +- Follow the [Chris Beams](http://chris.beams.io/posts/git-commit/) style for |
| 44 | + commit messages. |
| 45 | +- Every pull request should answer: |
| 46 | + - **What changed?** |
| 47 | + - **Why?** |
| 48 | + - **Breaking changes?** |
| 49 | + - **Server PR** (if the change requires a coordinated server update) |
| 50 | +- Comments should be complete sentences and end with a period. |
| 51 | + |
| 52 | +## Review Checklist |
| 53 | +- `./gradlew spotlessCheck` must pass. |
| 54 | +- All tests from `./gradlew test` must succeed. |
| 55 | +- Add new tests for any new feature or bug fix. |
| 56 | +- Update documentation for user facing changes. |
| 57 | + |
| 58 | +For more details see `CONTRIBUTING.md` in the repository root. |
0 commit comments