2022-11-28 21:45:31 +03:00

52 lines
1.2 KiB
YAML

name: Run tests with workflow_call
on:
workflow_call:
inputs:
cargo-dependencies:
description: "Cargo dependencies map"
type: string
ref:
description: "git ref to checkout to"
type: string
default: "matster"
env:
RUST_TEST_THREADS: 1
jobs:
marine-rs-sdk-test:
name: "Run tests"
runs-on: builder
steps:
- name: Checkout to marine-rs-sdk-test
uses: actions/checkout@v3
with:
repository: "fluencelabs/marine-rs-sdk-test"
ref: ${{ inputs.ref }}
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set dependencies
if: inputs.cargo-dependencies != ''
uses: fluencelabs/github-actions/cargo-set-dependency@main
with:
dependencies: ${{ inputs.cargo-dependencies }}
- name: Run cargo build
run: cargo build
- name: Run cargo check
run: cargo check -v --all-features
- name: Run cargo test
run: cargo test --release --all-features --no-fail-fast
- name: Run cargo clippy
run: cargo clippy -Z unstable-options --all
- name: Run rustfmt
uses: actions-rust-lang/rustfmt@v1