2021-09-08 20:05:26 +01:00
|
|
|
## Running tests
|
|
|
|
|
|
|
|
To run tests, you need Docker which starts PostgreSQL and MySQL servers:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
cd internal/dbtest
|
|
|
|
./test.sh
|
|
|
|
```
|
|
|
|
|
2022-04-24 11:26:22 +01:00
|
|
|
To ease debugging, you can run tests and print all executed queries:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
BUNDEBUG=2 TZ= go test -run=TestName
|
|
|
|
```
|
|
|
|
|
2021-09-08 20:05:26 +01:00
|
|
|
## Releasing
|
2021-08-25 14:34:33 +01:00
|
|
|
|
|
|
|
1. Run `release.sh` script which updates versions in go.mod files and pushes a new branch to GitHub:
|
|
|
|
|
|
|
|
```shell
|
2021-10-24 12:14:37 +01:00
|
|
|
TAG=v1.0.0 ./scripts/release.sh
|
2021-08-25 14:34:33 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
2. Open a pull request and wait for the build to finish.
|
|
|
|
|
|
|
|
3. Merge the pull request and run `tag.sh` to create tags for packages:
|
|
|
|
|
|
|
|
```shell
|
2021-10-24 12:14:37 +01:00
|
|
|
TAG=v1.0.0 ./scripts/tag.sh
|
2021-08-25 14:34:33 +01:00
|
|
|
```
|
2022-04-24 11:26:22 +01:00
|
|
|
|
|
|
|
## Documentation
|
|
|
|
|
|
|
|
To contribute to the docs visit https://github.com/go-bun/bun-docs
|