[refactor] Split the 4,467-line lib.rs into domain modules #160
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: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| fmt: | |
| name: Formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: 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 | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy (deny warnings) | |
| run: cargo clippy --all-targets -- -D warnings | |
| build: | |
| name: Build Optimized WASM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32v1-none | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install wasm-opt | |
| run: sudo apt-get update && sudo apt-get install -y binaryen | |
| - name: Build production WASM artifacts | |
| run: ./scripts/build_wasm.sh | |
| - name: Print WASM artifact sizes | |
| run: | | |
| { | |
| echo "## Optimized WASM Artifacts" | |
| echo "" | |
| find target -name '*.wasm' -type f | sort | while read -r f; do | |
| size=$(stat -c%s "$f") | |
| echo "- \`$f\`: $size bytes" | |
| done | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| find target -name '*.wasm' -type f | sort | while read -r f; do | |
| size=$(stat -c%s "$f") | |
| echo "$f: $size bytes" | |
| done | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test | |
| audit: | |
| name: Dependency Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run cargo audit | |
| run: cargo audit | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: Run coverage | |
| run: cargo tarpaulin --all-features --workspace --timeout 120 --out Stdout | |
| sdk-parity: | |
| name: SDK Error Code Parity | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Check SDK error code parity | |
| run: python3 scripts/check_error_parity.py |