This repository was archived by the owner on Jul 7, 2025. It is now read-only.
ci(test): simplify workflow and use binstall to download cargo-component #21
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: Cargo test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run tests | |
| env: | |
| CARGO_COMPONENT_VERSION: "0.13.1" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install wasm32-unknown-unknown target | |
| uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - name: Install cargo-component | |
| uses: cargo-bins/cargo-binstall@main | |
| run: cargo-binstall cargo-component --locked --version 0.13.1 --force --no-confirm | |
| - name: Run `cargo test` | |
| run: cargo test --workspace --exclude example-extension | |
| rustfmt: | |
| name: Check formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run `cargo fmt` | |
| run: cargo fmt --all -- --check |