Add e2e test for the live shared-directory monitor #53
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] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| # Pin the vendored MiniUPnP C source the native miniupnpc-sys build links against. | |
| MINIUPNP_REF: bced81fb0b73ae78c9b911c89e881fbc6d4a5c7c | |
| jobs: | |
| build-test: | |
| name: build+test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| - name: Checkout emulebb-miniupnp (native C source) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: emulebb/emulebb-miniupnp | |
| ref: ${{ env.MINIUPNP_REF }} | |
| path: .ci/emulebb-miniupnp | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build workspace | |
| shell: bash | |
| env: | |
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | |
| run: cargo build --workspace --locked | |
| - name: Test workspace (core suite) | |
| shell: bash | |
| env: | |
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | |
| X_LOCAL_IP: 127.0.0.1 | |
| # The kad_swarm multi-node networking tests are exercised in the | |
| # non-blocking step below while their cross-node transfer timing is | |
| # investigated (tracked: RUST-BUG-001). Everything else gates the matrix. | |
| run: cargo test --workspace --locked -- --skip local_kad_swarm | |
| - name: Test kad_swarm (non-blocking) | |
| shell: bash | |
| continue-on-error: true | |
| env: | |
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | |
| X_LOCAL_IP: 127.0.0.1 | |
| run: cargo test -p emulebb-core --test kad_swarm --locked -- --test-threads=1 | |
| quality: | |
| name: policy + format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| - name: Install Rust (stable + rustfmt, clippy) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Rust client policy guard | |
| run: python tools/check_rust_client_policy.py | |
| - name: Format check | |
| run: cargo fmt --all --check | |
| # Relaxed (advisory) while emulebb-rust is in active development. Tighten to | |
| # blocking `-- -D warnings` before the Phase 0 "perfectly functional" gate. | |
| - name: Clippy (advisory) | |
| continue-on-error: true | |
| run: cargo clippy --workspace --all-targets | |
| supply-chain: | |
| name: cargo-deny (advisories) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| - name: cargo-deny — security advisories | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| # Advisories (vulnerabilities/yanked) are the hard gate from day one. | |
| # bans/licenses tighten after a dependency audit (see deny.toml). | |
| command: check advisories |