Rust implementation of the CVM algorithm for counting distinct elements in a stream
1name: CI
2
3on:
4 push:
5 branches: [ main ]
6 pull_request:
7 branches: [ main ]
8
9env:
10 CARGO_TERM_COLOR: always
11
12jobs:
13 test:
14 name: Test Suite
15 runs-on: ${{ matrix.os }}
16 strategy:
17 matrix:
18 os: [ubuntu-latest, windows-latest, macos-latest]
19 rust: [stable]
20
21 steps:
22 - uses: actions/checkout@v4
23
24 - name: Install Rust
25 uses: dtolnay/rust-toolchain@stable
26 with:
27 toolchain: ${{ matrix.rust }}
28 components: rustfmt, clippy
29
30 - name: Cache dependencies
31 uses: actions/cache@v4
32 with:
33 path: |
34 ~/.cargo/registry
35 ~/.cargo/git
36 target
37 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38
39 - name: Check formatting
40 run: cargo fmt --all -- --check
41
42 - name: Run Clippy
43 run: cargo clippy --all-targets --all-features -- -D warnings
44
45 - name: Run tests
46 run: cargo test --all-features
47
48 - name: Run doc tests
49 run: cargo test --doc