Integrate DefiPlaza #258
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: Test | |
on: | |
pull_request: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Run tests | |
run: cargo test --workspace --features package-loader/build-time-blueprints --exclude stateful-tests | |
env: | |
# Enable sccache | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
check-formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Check formatting | |
run: cargo fmt --check | |
env: | |
# Enable sccache | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
cargo-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Cargo Check | |
run: cargo check --all | |
env: | |
# Enable sccache | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
clippy-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Clippy Check | |
run: cargo clippy --all | |
env: | |
# Enable sccache | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" |