Skip to content

Commit aec8f8d

Browse files
authored
docs(contributing): remove outdated info from CONTRIBUTING.md. (#2306)
1 parent 4a2d83f commit aec8f8d

1 file changed

Lines changed: 51 additions & 51 deletions

File tree

CONTRIBUTING.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,98 @@
1-
# Developing Temporal Go SDK
1+
# Contributing to Temporal Go SDK
22

33
This doc is intended for contributors to Go SDK (hopefully that's you!)
44

5-
**Note:** All contributors also need to fill out the [Temporal Contributor License Agreement](https://gist.github.com/samarabbas/7dcd41eb1d847e12263cc961ccfdb197) before we can merge in any of your changes.
5+
All contributors must complete the Temporal Contributor License Agreement (CLA) before changes can be merged. A link to the CLA will be posted in the PR.
66

7-
## Development Environment
7+
## Prerequisites
88

9-
* [Go Lang](https://golang.org/) (minimum version required is 1.14):
10-
- Ubuntu: `sudo apt install golang`.
11-
- OS X: `brew install go` and add this to your `.bashrc`:
9+
- [Go](https://go.dev/) 1.24+ (see [go.mod](go.mod) for the minimum supported version)
1210

13-
```
14-
export GOPATH=$HOME/go
15-
export GOROOT="$(brew --prefix go)/libexec"
16-
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
17-
```
11+
## Local development workflow
1812

19-
## Checking out the code
13+
The canonical local commands are provided by the build tool in `internal/cmd/build`.
2014

21-
Temporal GO SDK uses go modules, there is no dependency on `$GOPATH` variable. Clone the repo into the preferred location:
15+
Tests are managed through the build tool at `internal/cmd/build`. This tool handles starting an embedded Temporal dev
16+
server with the required dynamic configs and search attributes, enforces consistent test flags (`-race`, `-count 1`, no caching),
17+
and manages coverage collection — so you don't need to manually configure a server or remember the right flags.
2218

2319
```bash
24-
git clone https://github.com/temporalio/sdk-go.git
20+
cd internal/cmd/build
2521
```
2622

27-
## Commit Messages And Titles of Pull Requests
28-
29-
Overcommit adds some requirements to your commit messages. At Temporal, we follow the
30-
[Chris Beams](http://chris.beams.io/posts/git-commit/) guide to writing git
31-
commit messages. Read it, follow it, learn it, love it.
23+
Run static analysis checks:
3224

33-
All commit messages are from the titles of your pull requests. So make sure follow the rules when titling them.
34-
Please don't use very generic titles like "bug fixes".
35-
36-
All PR titles should start with Upper case.
25+
```bash
26+
go run . check
27+
```
3728

38-
## Testing
29+
Run unit tests (all packages except `test/`):
3930

40-
Tests are managed through the build tool at `internal/cmd/build`. This tool handles starting an embedded Temporal dev
41-
server with the required dynamic configs and search attributes, enforces consistent test flags (`-race`, `-count 1`, no caching),
42-
and manages coverage collection — so you don't need to manually configure a server or remember the right flags.
31+
```bash
32+
go run . unit-test
33+
```
4334

44-
Run all static analysis tools:
35+
Run integration tests with an embedded Temporal dev server:
4536

4637
```bash
47-
cd ./internal/cmd/build
48-
go run . check
38+
go run . integration-test -dev-server
4939
```
5040

51-
### Integration Tests
41+
If you omit `-dev-server`, integration tests connect to a server already running on `localhost:7233`.
42+
43+
## Running specific tests
44+
45+
Use `-run` with the same semantics as `go test -run`.
5246

53-
Integration tests live in the `test/` directory and require a Temporal server by default. Use `-dev-server` to start an
54-
embedded server automatically:
47+
Unit tests:
5548

5649
```bash
57-
cd ./internal/cmd/build
58-
go run . integration-test -dev-server
50+
go run . unit-test -run "TestMyFunction"
5951
```
6052

61-
Run a specific test with `-run` (uses the same syntax as `go test -run`):
53+
Integration tests:
6254

6355
```bash
64-
# Run a single test within a suite
65-
cd ./internal/cmd/build
56+
# Single test in a suite
6657
go run . integration-test -dev-server -run "TestIntegrationSuite/TestMyTest"
6758

68-
# Run all tests in a suite
69-
cd ./internal/cmd/build
59+
# Entire suite
7060
go run . integration-test -dev-server -run "TestWorkerTunerTestSuite"
7161
```
7262

73-
Without `-dev-server`, the tests connect to a server already running on `localhost:7233`.
63+
## Coverage
64+
65+
Unit test coverage (writes per-package profiles under `.build/coverage`):
7466

75-
### Unit Tests
67+
```bash
68+
go run . unit-test -coverage
69+
```
7670

77-
Unit tests cover all packages except `test/`:
71+
Integration test coverage:
7872

7973
```bash
80-
cd ./internal/cmd/build
81-
go run . unit-test
74+
go run . integration-test -dev-server -coverage-file integration-test.out
8275
```
8376

84-
Run specific unit tests with `-run`:
77+
Merge coverage files:
8578

8679
```bash
87-
cd ./internal/cmd/build
88-
go run . unit-test -run "TestMyFunction"
80+
go run . merge-coverage-files coverage.out
8981
```
9082

91-
## Updating go mod files
83+
## Go module housekeeping
9284

93-
Sometimes all go.mod files need to be tidied. For an easy way to do this on linux or (probably) mac,
94-
run:
85+
If dependencies change, tidy all modules:
9586

9687
```bash
9788
find . -name go.mod -execdir go mod tidy \;
9889
```
90+
91+
## Pull request checklist
92+
93+
Before opening or updating a pull request:
94+
95+
- Run `go run . check` from `internal/cmd/build`.
96+
- Run relevant tests (`unit-test` and, when needed, `integration-test -dev-server`).
97+
- Keep changes focused and include tests for behavior changes.
98+
- Update documentation/comments when public behavior changes.

0 commit comments

Comments
 (0)