[deps]: Update Rust to v2025-06-08 #1791
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: Rust tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci-pass: | |
name: Check if tests passed | |
runs-on: ubuntu-24.04 | |
needs: | |
- test | |
steps: | |
- name: Check if tests passed | |
run: exit 0 | |
test: | |
name: ${{ matrix.os }} / default | |
runs-on: ${{ matrix.os || 'ubuntu-24.04' }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-24.04 | |
- macOS-14 | |
- windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable | |
with: | |
toolchain: stable | |
- name: Cache cargo registry | |
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | |
- name: Test | |
run: cargo test --workspace --all-features | |
test-wasm: | |
name: WASM | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set Rust Toolchain | |
id: toolchain | |
shell: bash | |
run: | | |
RUST_TOOLCHAIN="$(grep -oP '^channel.*"(\K.*?)(?=")' rust-toolchain.toml)" | |
echo "RUST_TOOLCHAIN=${RUST_TOOLCHAIN}" | tee -a "${GITHUB_OUTPUT}" | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable | |
with: | |
toolchain: "${{ steps.toolchain.outputs.RUST_TOOLCHAIN }}" | |
targets: wasm32-unknown-unknown | |
components: rust-src | |
- name: Cache cargo registry | |
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | |
- name: Install wasm-bindgen-cli | |
run: cargo install wasm-bindgen-cli --version 0.2.100 | |
- name: Test WASM | |
run: cargo test --target wasm32-unknown-unknown -p bitwarden-wasm-internal -p bitwarden-threading -p bitwarden-error -p bitwarden-uuid --all-features | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # stable | |
with: | |
toolchain: stable | |
components: llvm-tools | |
- name: Cache cargo registry | |
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | |
- name: Install cargo-llvm-cov | |
run: cargo install cargo-llvm-cov --version 0.5.38 | |
- name: Generate coverage | |
run: cargo llvm-cov --all-features --lcov --output-path lcov.info --ignore-filename-regex "crates/bitwarden-api-" | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 |