Split formatting checks to a seperate workflow #392
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: SquireSDK CI | |
on: | |
push: | |
branches: [ main, development ] | |
pull_request: | |
branches: [ main, development ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
squire_sdk_build_tests: | |
name: Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
rust: [stable, beta, nightly] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: ${{ matrix.rust }} | |
components: rustfmt | |
- uses: taiki-e/install-action@cargo-hack | |
- uses: actions/checkout@v4 | |
- run: cargo hack build --feature-powerset --exclude-features deck_sites --no-dev-deps --package squire_sdk --verbose | |
- run: cargo hack test --package squire_sdk --feature-powerset --exclude-features deck_sites --verbose | |
- run: cargo doc --package squire_sdk --all-features --verbose | |
squire_lib_wasm_tests: | |
name: Wasm Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [nightly, beta, stable] | |
steps: | |
- uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: ${{ matrix.rust }} | |
targets: wasm32-unknown-unknown | |
- uses: actions/checkout@v4 | |
- run: cargo build --package squire_sdk --features=client --target=wasm32-unknown-unknown --verbose | |
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- run: wasm-pack test --headless --chrome --firefox ./squire_sdk/ --features=client --verbose |