Skip to content

Commit

Permalink
Update contributing docs (#601)
Browse files Browse the repository at this point in the history
* Fix typo

* Add guidelines for testing

* Add make coverage command
  • Loading branch information
MoonGyu1 authored Aug 7, 2023
1 parent 65c8164 commit 16fd182
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ docker-compose -f build/docker/docker-compose.yml up --build -d
make test
```

You can automatically check the programmatic and stylistic errors of your code.

```sh
make lint
```

## Design Documents

For developers, [design documents](design/README.md) about core features are provided. You can refer to the docs for understanding the overall structure of Yorkie.
Expand Down Expand Up @@ -88,6 +94,13 @@ There are multiple types of tests. The location of the test code varies with typ
- Integration: These tests cover interactions of package components or interactions between Yorkie packages and some other non-Yorkie system resource (eg: MongoDB, ETCD).
- Benchmark: These confirm that the performance of the implemented function.

### Code Coverage
We are using [Codecov](https://about.codecov.io) for analyzing PR's code coverage. If you want to check the coverage of your code in local browser, you can run the command below.

```sh
make coverage
```

## Contributor License Agreement (CLA)

We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution.
Expand All @@ -98,6 +111,8 @@ Open a pull request ("PR") to any of our open source projects to sign the CLA. A

Follow the steps given by the bot to sign the CLA. This will require you to log in with GitHub. We will only use this information for CLA tracking. You only have to sign the CLA once. Once you've signed the CLA, future contributions to the project will not require you to sign again.

If the bot still require you to sign the CLA although you had already signed, you can check your commit's author is equal to the Github account that you logged in.

### Why Require a CLA?

Agreeing to a CLA explicitly states that you are entitled to provide a contribution, that you cannot withdraw permission to use your contribution at a later date, and that Yorkie Team has permission to use your contribution.
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ fmt: ## applies format and simplify codes
lint: ## runs the golang-ci lint, checks for lint violations
golangci-lint run ./...

coverage: ## runs coverage tests
go clean -testcache
go test -tags integration -race -coverprofile=coverage.txt -covermode=atomic ./...
go tool cover -html=coverage.txt
rm -f coverage.txt

test: ## runs integration tests that require local applications such as MongoDB
go clean -testcache
go test -tags integration -race ./...
Expand Down
2 changes: 1 addition & 1 deletion server/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (b *Backend) Shutdown() error {
logging.DefaultLogger().Error(err)
}

logging.DefaultLogger().Infof("backend stoped: id: %s", b.serverInfo.ID)
logging.DefaultLogger().Infof("backend stopped: id: %s", b.serverInfo.ID)
return nil
}

Expand Down

0 comments on commit 16fd182

Please sign in to comment.