update dependencies #230
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: Checks / Rust | |
| on: | |
| push: | |
| jobs: | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Check formatting | |
| run: | | |
| cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Configure sccache | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - shell: bash | |
| run: | | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CUDA_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| - name: Cache Rust registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/git | |
| !~/.cargo/git/checkouts | |
| ~/.cargo/registry | |
| !~/.cargo/registry/src | |
| key: rust-registry-${{hashFiles('**/Cargo.lock') }} | |
| - name: Clippy | |
| run: | | |
| cargo clippy \ | |
| --workspace \ | |
| --locked \ | |
| --no-deps \ | |
| --profile test \ | |
| -- \ | |
| -D warnings \ | |
| -W clippy::cognitive_complexity | |
| - name: Verify federation crate has no server deps | |
| run: | | |
| cargo tree -p matrix-federation-tester --locked 2>/dev/null \ | |
| | grep -E "axum|sea-orm|lettre|redis|argon2|color-eyre" \ | |
| && echo "SERVER DEPS LEAKED INTO LIBRARY" && exit 1 \ | |
| || echo "No server deps in library — OK" | |
| - name: Check utoipa feature compiles | |
| run: cargo check -p matrix-federation-tester --locked --features utoipa | |
| - name: Show sccache stats | |
| if: always() | |
| run: sccache --show-stats | |
| cargo-test: | |
| name: Cargo Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Configure sccache | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - shell: bash | |
| run: | | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_C_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CXX_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| echo "CMAKE_CUDA_COMPILER_LAUNCHER=sccache" >> $GITHUB_ENV | |
| - name: Cache Rust registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/git | |
| !~/.cargo/git/checkouts | |
| ~/.cargo/registry | |
| !~/.cargo/registry/src | |
| key: rust-registry-${{hashFiles('**/Cargo.lock') }} | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Cargo Test | |
| run: | | |
| cargo nextest run \ | |
| --workspace \ | |
| --locked \ | |
| --cargo-profile test \ | |
| --all-targets \ | |
| --profile ci | |
| - name: Show sccache stats | |
| if: always() | |
| run: sccache --show-stats |