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: SquireLib CI | |
on: | |
push: | |
branches: [ main, development ] | |
pull_request: | |
branches: [ main, development ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
squire_lib_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: actions/checkout@v4 | |
- run: cargo build --package squire_lib --verbose | |
- run: cargo test --package squire_lib --verbose | |
- run: cargo doc --package squire_lib --verbose | |
squire_lib_wasm_tests: | |
name: Wasm Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta, nightly] | |
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_lib --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_lib/ --verbose |