Fix Clippies about partial_cmp()
#576
Workflow file for this run
This file contains 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: Run tests | |
on: | |
pull_request: | |
branches: ["*"] | |
push: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install latest stable compiler | |
id: toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: clippy | |
- name: Cache multiple paths | |
id: cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/*.lock') }} | |
- name: Clean cache if it's too big | |
run: | | |
du -hs target || exit 0 | |
target_size=$(du -ms target | awk '{print $1}') | |
if [ "$target_size" -gt "5120" ]; then | |
echo "size is ${target_size}, running cargo clean" | |
cargo clean | |
fi | |
- name: Lint code | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
- name: Check format | |
run: cargo fmt -- --check | |
- name: Run tests | |
run: cargo test | |
- name: Verify example-protocol can be compiled | |
run: | | |
pushd examples/example-protocol | |
cargo run | |
popd | |
- name: Install Wasm target | |
run: | | |
rustup target add wasm32-unknown-unknown wasm32-wasi | |
- name: Verify example-plugin builds | |
run: | | |
pushd examples/example-plugin | |
cargo build | |
popd | |
- name: Install Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Run end-to-end tests in Deno runtime | |
run: | | |
pushd examples/example-deno-runtime | |
deno test --allow-read tests.ts | |
popd | |
- name: Run end-to-end tests in Wasmer 2 runtime | |
run: | | |
pushd examples/example-rust-wasmer2-runtime | |
cargo test | |
cargo test -F wasi | |
popd |