Initial commit. #49
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| # Prevent concurrent builds from the same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Minimal permissions by default | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -D warnings | |
| CARGO_INCREMENTAL: 1 | |
| CARGO_BUILD_JOBS: 4 | |
| RUST_TEST_THREADS: 4 | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [blacksmith-4vcpu-ubuntu-2404] | |
| rust: [stable, 1.70.0] | |
| max-parallel: 4 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| cache-key: "cache-unit-${{ runner.os }}-${{ matrix.rust }}" | |
| - name: Run unit tests | |
| run: cargo test --lib --all-features | |
| - name: Run doc tests | |
| run: cargo test --doc | |
| integration-tests: | |
| name: Integration Tests (Group ${{ matrix.group }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 25 | |
| strategy: | |
| matrix: | |
| os: [blacksmith-8vcpu-ubuntu-2404] | |
| rust: [stable, 1.70.0] | |
| group: [1, 2, 3] # Split tests into 3 parallel groups | |
| max-parallel: 6 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| cache-key: "cache-integration-${{ runner.os }}-${{ matrix.rust }}-${{ matrix.group }}" | |
| - name: Run integration tests (Group 1) | |
| if: matrix.group == 1 | |
| run: | | |
| cargo test --test analysis_runner_integration --all-features | |
| cargo test --test analyzer_integration_tests --all-features | |
| cargo test --test anomaly_detection_integration --all-features | |
| cargo test --test approx_count_distinct_integration --all-features | |
| cargo test --test builder_extensions_test --all-features | |
| cargo test --test cloud_storage_test --all-features | |
| cargo test --test column_count_integration --all-features | |
| cargo test --test column_profiler_integration --all-features | |
| cargo test --test completeness_integration --all-features | |
| cargo test --test context_integration --all-features | |
| - name: Run integration tests (Group 2) | |
| if: matrix.group == 2 | |
| run: | | |
| cargo test --test data_type_integration --all-features | |
| cargo test --test distinctness_integration --all-features | |
| cargo test --test exact_quantile_integration --all-features | |
| cargo test --test histogram_integration --all-features | |
| cargo test --test integration_test_suite --all-features | |
| cargo test --test joined_sources_integration --all-features | |
| cargo test --test metrics_test --all-features | |
| cargo test --test multi_source_integration --all-features | |
| cargo test --test optimizer_integration --all-features | |
| - name: Run integration tests (Group 3) | |
| if: matrix.group == 3 | |
| run: | | |
| cargo test --test performance_regression_test --all-features | |
| cargo test --test property_tests --all-features | |
| cargo test --test security_tests --all-features | |
| cargo test --test sources_integration --all-features | |
| cargo test --test string_length_integration --all-features | |
| cargo test --test structured_logging_test --all-features | |
| cargo test --test test_utils_test --all-features | |
| cargo test --test type_inference_integration --all-features | |
| cargo test --test unique_value_ratio_integration --all-features | |
| # Feature combination tests | |
| feature-tests: | |
| name: Feature Tests | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| rust: [stable] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| cache-key: "cache-features-${{ runner.os }}-${{ matrix.rust }}" | |
| - name: Run tests (no default features) | |
| run: cargo test --no-default-features | |
| fmt: | |
| name: Rustfmt | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| cache-key: "cache-fmt" | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| cache-key: "cache-clippy" | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| coverage: | |
| name: Code Coverage | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: stable | |
| cache-key: "cache-coverage" | |
| - name: Install tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: Generate code coverage | |
| run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./cobertura.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| msrv: | |
| name: MSRV Check | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust (MSRV) | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: 1.70.0 | |
| cache-key: "cache-msrv" | |
| - name: Check MSRV | |
| run: cargo check --all-features | |
| build: | |
| name: Build Check | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: stable | |
| cache-key: "cache-build" | |
| - name: Build | |
| run: cargo build --release --all-features | |
| - name: Build benchmarks | |
| run: cargo bench --no-run | |
| integration: | |
| name: Integration Tests | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| toolchain: stable | |
| cache-key: "cache-integration" | |
| - name: Run integration tests | |
| run: cargo integration |