diff --git a/.github/workflows/selftest.yml b/.github/workflows/selftest.yml index 3682d0d..1b84c22 100644 --- a/.github/workflows/selftest.yml +++ b/.github/workflows/selftest.yml @@ -3,34 +3,75 @@ name: CI on: [push, pull_request] jobs: - selftest: + simple: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - name: Test Action on ${{ matrix.os }} + name: Test root check/test on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true + - run: | + rustup toolchain install --profile minimal stable + rustup default stable - uses: ./ with: - cache-on-failure: true - workspace-paths: | - ./ - wasm-workspace/ + workspace-paths: tests - run: | - cargo install cargo-deny --locked + cd tests cargo check cargo test - rustup target install wasm32-unknown-unknown - cd wasm-workspace && cargo check \ No newline at end of file + + install: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + name: Test `cargo install` on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - run: | + rustup toolchain install --profile minimal stable + rustup default stable + + - uses: ./ + + - run: cargo install cargo-deny --locked + + workspaces: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + name: Test multiple workspaces on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - run: | + rustup toolchain install --profile minimal --target wasm32-unknown-unknown stable + rustup default stable + + - uses: ./ + with: + workspace-paths: | + tests + tests/wasm-workspace + + - run: | + cd tests + cargo check + cd wasm-workspace + cargo check diff --git a/Cargo.lock b/tests/Cargo.lock similarity index 100% rename from Cargo.lock rename to tests/Cargo.lock diff --git a/Cargo.toml b/tests/Cargo.toml similarity index 100% rename from Cargo.toml rename to tests/Cargo.toml diff --git a/src/main.rs b/tests/src/main.rs similarity index 100% rename from src/main.rs rename to tests/src/main.rs diff --git a/wasm-workspace/.cargo/config.toml b/tests/wasm-workspace/.cargo/config.toml similarity index 100% rename from wasm-workspace/.cargo/config.toml rename to tests/wasm-workspace/.cargo/config.toml diff --git a/wasm-workspace/.gitignore b/tests/wasm-workspace/.gitignore similarity index 100% rename from wasm-workspace/.gitignore rename to tests/wasm-workspace/.gitignore diff --git a/wasm-workspace/Cargo.toml b/tests/wasm-workspace/Cargo.toml similarity index 100% rename from wasm-workspace/Cargo.toml rename to tests/wasm-workspace/Cargo.toml diff --git a/wasm-workspace/crates/one/Cargo.toml b/tests/wasm-workspace/crates/one/Cargo.toml similarity index 100% rename from wasm-workspace/crates/one/Cargo.toml rename to tests/wasm-workspace/crates/one/Cargo.toml diff --git a/wasm-workspace/crates/one/src/main.rs b/tests/wasm-workspace/crates/one/src/main.rs similarity index 100% rename from wasm-workspace/crates/one/src/main.rs rename to tests/wasm-workspace/crates/one/src/main.rs diff --git a/wasm-workspace/crates/two/Cargo.toml b/tests/wasm-workspace/crates/two/Cargo.toml similarity index 100% rename from wasm-workspace/crates/two/Cargo.toml rename to tests/wasm-workspace/crates/two/Cargo.toml diff --git a/wasm-workspace/crates/two/src/main.rs b/tests/wasm-workspace/crates/two/src/main.rs similarity index 100% rename from wasm-workspace/crates/two/src/main.rs rename to tests/wasm-workspace/crates/two/src/main.rs