github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/CONTRIBUTING.md (about)

     1  # How to contribute
     2  
     3  ydb-go-sdk (and YDB also) is an open project, and you can contribute to it in many ways. You can help with ideas, code, or documentation. We appreciate any efforts that help us to make the project better.
     4  
     5  Thank you!
     6  
     7  ## Table of contents
     8    * [Legal Info](#legal-info)
     9    * [Technical Info](#technical-info)
    10      * [Instructions for checks code changes locally](#instructions-for-checks-code-changes-locally)
    11        + [Prerequisites](#prerequisites)
    12        + [Run linter checks](#run-linter-checks)
    13        + [Run tests](#run-tests)
    14          - [Only unit tests](#only-unit-tests)
    15          - [All tests (include integration tests)](#all-tests)
    16  
    17  ## Technical Info
    18  
    19  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
    20  2. Fork the repository <https://github.com/ydb-platform/ydb-go-sdk> on GitHub to start making your changes to the **master** branch (or branch off of it).
    21  3. Write a test which shows that the bug was fixed or that the feature works as expected.
    22  4. Send a pull request and bug the maintainer until it gets merged and published.
    23  
    24  ### Instructions for checks code changes locally
    25  
    26  #### Prerequisites
    27  
    28  - Docker. See [official documentations](https://docs.docker.com/engine/install/) for install `docker` to your operating system
    29  - go >= 1.18. See [official instructions](https://go.dev/doc/install) for install `golang` to your operating system
    30  - golangci-lint >= 1.48.0. See [official instructions](https://golangci-lint.run/usage/install/) for install `golangci-lint` to your operating system
    31  
    32  #### Run linter checks
    33  
    34  All commands must be called from project directory.
    35  
    36  ```sh
    37  golangci-lint run ./...
    38  ```
    39  
    40  #### Run tests
    41  
    42  All commands must be called from project directory.
    43  
    44  ##### Only unit tests
    45  
    46  ```sh
    47  go test -race -tags fast ./... 
    48  ```
    49  
    50  ##### All tests
    51  
    52  ```sh
    53  docker run -itd --name ydb -dp 2135:2135 -dp 2136:2136 -dp 8765:8765 -v `pwd`/ydb_certs:/ydb_certs -e YDB_LOCAL_SURVIVE_RESTART=true -e YDB_USE_IN_MEMORY_PDISKS=true -h localhost ydbplatform/local-ydb:latest
    54  export YDB_CONNECTION_STRING="grpcs://localhost:2135/local"
    55  export YDB_SSL_ROOT_CERTIFICATES_FILE="`pwd`/ydb_certs/ca.pem"
    56  export YDB_SESSIONS_SHUTDOWN_URLS="http://localhost:8765/actors/kqp_proxy?force_shutdown=all"
    57  go test -race ./... 
    58  docker stop ydb
    59  ```