-
Notifications
You must be signed in to change notification settings - Fork 121
37 lines (34 loc) · 1.23 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 apachepulsar/pulsar:${{ matrix.pulsar-version }} bin/pulsar standalone
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features protobuf-src -- --nocapture