Continuous Integration (CI)

With `--test`, the job prepares an identical ClickHouse setup as used in CI but runs only the selected tests:

```
python -m ci.praktika run "Stateless tests (amd_debug, parallel)" \
  --test 00001_select1
```

- You can pass multiple test names:

  ```
  python -m ci.praktika run "Stateless tests (amd_debug, parallel)" \
    --test 00001_select1 00002_log_and_exception_messages_formatting
  ```
- Tip: If any ClickHouse configuration is acceptable and you just need to run specific tests, use the alias `functional` instead of the full job name:

  ```
  python -m ci.praktika run functional --test 00001_select1
  ```

#### Additional Customization Options[​](#additional-customization-options "Direct link to Additional Customization Options")

- `--path PATH` — custom path to the ClickHouse binary. By default, the runner searches in order: `./ci/tmp/clickhouse`, `./build/programs/clickhouse`, `./clickhouse`.
- `--count N` — repeat each test N times.
- `--workers N` — override the automatic calculation of parallel workers derived from machine capacity.

## Build check[​](#build-check "Direct link to Build check")

Builds ClickHouse in various configurations for use in further steps.

### Running Builds Locally[​](#running-builds-locally "Direct link to Running Builds Locally")

The build can be run locally in a CI-like environment using:

```
python -m ci.praktika run "<BUILD_JOB_NAME>"
```

No dependencies other than Python 3 and Docker are required.

#### Available Build Jobs[​](#available-build-jobs "Direct link to Available Build Jobs")

The build job names are exactly as they appear in the CI Report:

**AMD64 Builds:**

- `Build (amd_debug)` - Debug build with symbols
- `Build (amd_release)` - Optimized release build
- `Build (amd_asan)` - Address Sanitizer build
- `Build (amd_tsan)` - Thread Sanitizer build
- `Build (amd_msan)` - Memory Sanitizer build
- `Build (amd_ubsan)` - Undefined Behavior Sanitizer build
- `Build (amd_binary)` - Quick release build without Thin LTO
- `Build (amd_compat)` - Compatibility build for older systems
- `Build (amd_musl)` - Build with musl libc
- `Build (amd_darwin)` - macOS build
- `Build (amd_freebsd)` - FreeBSD build

**ARM64 Builds:**

- `Build (arm_release)` - ARM64 optimized release build
- `Build (arm_asan)` - ARM64 Address Sanitizer build
- `Build (arm_coverage)` - ARM64 build with coverage instrumentation
- `Build (arm_binary)` - ARM64 Quick release build without Thin LTO
- `Build (arm_darwin)` - macOS ARM64 build
- `Build (arm_v80compat)` - ARMv8.0 compatibility build

**Other Architectures:**

- `Build (ppc64le)` - PowerPC 64-bit Little Endian
- `Build (riscv64)` - RISC-V 64-bit
- `Build (s390x)` - IBM System/390 64-bit
- `Build (loongarch64)` - LoongArch 64-bit

If the job succeeds, build results will be available in the `<repo_root>/ci/tmp/build` directory.

**Note:** For builds not in the "Other Architectures" category (which use cross-compilation), your local machine architecture must match the build type to produce the build as requested by `BUILD_JOB_NAME`.

#### Example[​](#example-run-local "Direct link to Example")

To run a local debug build:

```
python -m ci.praktika run "Build (amd_debug)"
```

If the above approach does not work for you, use the cmake options from the build log and follow the [general build process](/docs/development/build).

## Functional stateless tests[​](#functional-stateless-tests "Direct link to Functional stateless tests")

Runs [stateless functional tests](/docs/development/tests#functional-tests) for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc.
Look at the report to see which tests fail, then reproduce the failure locally as described [here](/docs/development/tests#functional-tests).
Note that you have to use the correct build configuration to reproduce -- a test might fail under AddressSanitizer but pass in Debug.
Download the binary from [CI build checks page](/docs/install/advanced), or build it locally.

## Integration tests[​](#integration-tests "Direct link to Integration tests")

Runs [integration tests](/docs/development/tests#integration-tests).

## Bugfix validate check[​](#bugfix-validate-check "Direct link to Bugfix validate check")

Checks that either a new test (functional or integration) or there some changed tests that fail with the binary built on master branch.
This check is triggered when pull request has "pr-bugfix" label.

## Stress test[​](#stress-test "Direct link to Stress test")

Runs stateless functional tests concurrently from several clients to detect concurrency-related errors. If it fails:

- Fix all other test failures first;
- Look at the report to find the server logs and check them for possible causes
  of error.

## Compatibility check[​](#compatibility-check "Direct link to Compatibility check")

Checks that `clickhouse` binary runs on distributions with old libc versions.
If it fails, ask a maintainer for help.

## AST fuzzer[​](#ast-fuzzer "Direct link to AST fuzzer")

Runs randomly generated queries to catch program errors.
If it fails, ask a maintainer for help.

## Performance tests[​](#performance-tests "Direct link to Performance tests")

Measure changes in query performance.
This is the longest check that takes just below 6 hours to run.
The performance test report is described in detail [here](https://github.com/ClickHouse/ClickHouse/blob/master/tests/performance/scripts/README.md#how-to-read-the-report).

- [Merge with master](#merge-with-master)- [Docs check](#docs-check)- [Description check](#description-check)- [Docker image](#docker-image)
        - [Official docker library tests](#official-docker-library-tests)- [Marker check](#marker-check)- [Style check](#style-check)
            - [Running the style check job locally](#running-style-check-locally)- [Running stateless tests](#running-stateless-tests)- [Build check](#build-check)
                - [Running Builds Locally](#running-builds-locally)- [Functional stateless tests](#functional-stateless-tests)- [Integration tests](#integration-tests)- [Bugfix validate check](#bugfix-validate-check)- [Stress test](#stress-test)- [Compatibility check](#compatibility-check)- [AST fuzzer](#ast-fuzzer)- [Performance tests](#performance-tests)

Was this page helpful?