Skip to content

Allow adding published to the generated Cargo.toml #598

Allow adding published to the generated Cargo.toml

Allow adding published to the generated Cargo.toml #598

Workflow file for this run

---
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
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.77"
components: clippy, rustfmt
- 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: giraffate/clippy-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
filter_mode: nofilter
fail_on_error: true
clippy_flags: --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