Add ability to use rustls over native-tls (testing CI) #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- async-await | |
pull_request: | |
branches: | |
- async-await | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
clickhouse: | |
image: clickhouse/clickhouse-server | |
ports: | |
- 9000:9000 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
build-native-tls: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# NOTE: | |
# - we cannot use "services" because they are executed before the steps, i.e. repository checkout. | |
# - "job.container.network" is empty, hence "host" | |
# - not all tests "secure" aware, so both ports are exported | |
# - github actions does not support YAML anchors (sigh) | |
- name: Run clickhouse-server | |
run: docker run | |
-v ./extras/ci/generate_certs.sh:/docker-entrypoint-initdb.d/generate_certs.sh | |
-v ./extras/ci/overrides.xml:/etc/clickhouse-server/config.d/overrides.xml | |
-e CH_SSL_CERTIFICATE=/etc/clickhouse-server/config.d/server.crt | |
-e CH_SSL_PRIVATE_KEY=/etc/clickhouse-server/config.d/server.key | |
--network host | |
--rm | |
--detach | |
--publish 9443:9443 | |
--publish 9000:9000 | |
clickhouse/clickhouse-server | |
- name: Build | |
run: cargo build --features tls-native-tls --verbose | |
- name: Run tests | |
run: cargo test --features tls-native-tls --verbose | |
build-rustls: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# NOTE: | |
# - we cannot use "services" because they are executed before the steps, i.e. repository checkout. | |
# - "job.container.network" is empty, hence "host" | |
# - not all tests "secure" aware, so both ports are exported | |
# - github actions does not support YAML anchors (sigh) | |
- name: Run clickhouse-server | |
run: docker run | |
-v ./extras/ci/generate_certs.sh:/docker-entrypoint-initdb.d/generate_certs.sh | |
-v ./extras/ci/overrides.xml:/etc/clickhouse-server/config.d/overrides.xml | |
-e CH_SSL_CERTIFICATE=/etc/clickhouse-server/config.d/server.crt | |
-e CH_SSL_PRIVATE_KEY=/etc/clickhouse-server/config.d/server.key | |
--network host | |
--rm | |
--detach | |
--publish 9443:9443 | |
--publish 9000:9000 | |
clickhouse/clickhouse-server | |
- name: Build | |
run: cargo build --features tls-rustls --verbose | |
- name: Run tests | |
run: cargo test --features tls-rustls --verbose |