build: kafka SASL for Docker Image #76
Workflow file for this run
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: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master, "**"] | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: rustup component add rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: rustup component add clippy | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| needs: [fmt, clippy] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install OpenSSL dev libraries | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y libssl-dev pkg-config | |
| - name: Run tests (default features) | |
| run: cargo test --exclude rindexer_rust_playground --workspace | |
| - name: Run tests (all features including reth) | |
| run: cargo test --exclude rindexer_rust_playground --workspace --all-features | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| needs: [fmt, clippy] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install OpenSSL dev libraries | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y libssl-dev pkg-config | |
| - name: Install cargo-llvm-cov and cargo-nextest | |
| run: cargo install -q cargo-llvm-cov cargo-nextest --locked | |
| - name: Run coverage | |
| run: cargo llvm-cov nextest -p rindexer -p rindexer_cli --all-features --lcov --output-path lcov.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: true |