Fix monitor version parsing #1498
Workflow file for this run
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: Tests | |
on: | |
pull_request: | |
jobs: | |
check_formatting: | |
name: Check Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-formatting-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-formatting-v2- | |
cargo-${{ runner.os }}- | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
profile: minimal | |
- name: Check formatting | |
run: | | |
cargo +nightly fmt -- --check | |
website: | |
name: Build WASM binary | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
target: wasm32-unknown-unknown | |
override: true | |
profile: minimal | |
- uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-browser-tests-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-browser-tests-v2- | |
cargo-${{ runner.os }}- | |
- name: Build wasm package | |
env: | |
RUSTUP_TOOLCHAIN: nightly | |
run: wasm-pack build ./mutiny-wasm --release --weak-refs --target web | |
browser_tests: | |
name: Browser Tests | |
runs-on: ubuntu-latest | |
env: | |
RUSTUP_TOOLCHAIN: nightly | |
WASM_BINDGEN_TEST_TIMEOUT: 240 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
target: wasm32-unknown-unknown | |
override: true | |
profile: minimal | |
- uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- name: Setup trunk | |
uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-browser-tests-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-browser-tests-v2- | |
cargo-${{ runner.os }}- | |
- run: wasm-pack test --headless --firefox ./mutiny-core | |
- run: wasm-pack test --headless --chrome ./mutiny-core | |
- run: wasm-pack test --headless --firefox ./mutiny-wasm | |
- run: wasm-pack test --headless --chrome ./mutiny-wasm | |
wasm_checks: | |
name: Rust Wasm Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: clippy | |
target: wasm32-unknown-unknown | |
override: true | |
profile: minimal | |
- name: Setup trunk | |
uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-rust-wasm-checks-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-rust-wasm-checks-v2- | |
cargo-${{ runner.os }}- | |
- name: Check clippy mutiny-wasm | |
run: cargo clippy --all-features --tests --package mutiny-wasm -- -D warnings | |
core_tests_linux: | |
name: Core Tests on Linux | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- wasm32-unknown-unknown | |
- x86_64-unknown-linux-gnu | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
components: clippy | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-core-tests-linux-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-core-tests-linux-v2- | |
cargo-${{ runner.os }}- | |
- name: Add targets | |
run: rustup target add ${{ matrix.target }} | |
- name: Run cargo clippy | |
run: cargo clippy --all-features --tests --package mutiny-core --target=${{ matrix.target }} -- -D warnings | |
- name: Run cargo test | |
if: matrix.target != 'wasm32-unknown-unknown' | |
run: cargo test --all-features --package mutiny-core --target=${{ matrix.target }} | |
- name: Run cargo build | |
if: matrix.target != 'wasm32-unknown-unknown' | |
run: cargo build --all-features --package mutiny-core --target=${{ matrix.target }} | |
core_tests_mac: | |
name: Core Tests on macOS | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-apple-darwin | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
components: clippy | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-core-tests-mac-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-core-tests-mac-v2- | |
cargo-${{ runner.os }}- | |
- name: Add targets | |
run: rustup target add ${{ matrix.target }} | |
- name: Run cargo clippy | |
run: cargo clippy --all-features --tests --package mutiny-core --target=${{ matrix.target }} -- -D warnings | |
continue-on-error: true | |
- name: Run cargo test | |
run: cargo test --all-features --package mutiny-core --target=${{ matrix.target }} | |
- name: Run cargo build | |
run: cargo build --all-features --package mutiny-core --target=${{ matrix.target }} | |
core_tests_windows: | |
name: Core Tests on Windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-pc-windows-msvc | |
- i686-pc-windows-msvc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
profile: minimal | |
components: clippy | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-core-tests-windows-v2-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }} | |
restore-keys: | | |
cargo-${{ runner.os }}-core-tests-windows-v2- | |
cargo-${{ runner.os }}- | |
- name: Add targets | |
run: rustup target add ${{ matrix.target }} | |
- name: Run cargo clippy | |
run: cargo clippy --all-features --tests --package mutiny-core --target=${{ matrix.target }} -- -D warnings | |
continue-on-error: true | |
- name: Run cargo test | |
run: cargo test --all-features --package mutiny-core --target=${{ matrix.target }} | |
- name: Run cargo build | |
run: cargo build --all-features --package mutiny-core --target=${{ matrix.target }} |