feat: transactions #568
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: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --features protobuf-src | |
- name: Check Clippy | |
run: | | |
cargo clippy --tests --features telemetry,protobuf-src -- -D warnings | |
cargo clippy --tests --no-default-features --features compression,tokio-rustls-runtime,async-std-rustls-runtime,auth-oauth2,telemetry,protobuf-src -- -D warnings | |
- name: Install nightly rustfmt | |
run: rustup toolchain install nightly --component rustfmt | |
- name: Check format | |
run: cargo +nightly fmt --all --check | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
pulsar-version: [ 2.10.4, 2.11.2, 3.0.4, 3.1.3 ] | |
steps: | |
- name: Start Pulsar Standalone Container | |
run: | | |
docker run --name pulsar \ | |
-p 6650:6650 \ | |
-p 8080:8080 \ | |
-d \ | |
-e GITHUB_ACTIONS=true \ | |
-e CI=true \ | |
-e PULSAR_PREFIX_transactionCoordinatorEnabled="true" \ | |
-e PULSAR_PREFIX_systemTopicEnabled="true" \ | |
-e PULSAR_PREFIX_metadataStoreUrl="zk:127.0.0.1:2181" \ | |
apachepulsar/pulsar:${{ matrix.pulsar-version }} sh -c \ | |
"bin/apply-config-from-env.py \ | |
conf/standalone.conf && \ | |
bin/pulsar-daemon start zookeeper && \ | |
bin/pulsar initialize-transaction-coordinator-metadata -cs 127.0.0.1:2181 -c standalone && \ | |
bin/pulsar standalone" | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --features protobuf-src -- --nocapture |