Skip to content

Commit

Permalink
add CI for examples and fix parachain-example bug I left in
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Jul 19, 2023
1 parent 67d412f commit 77eeda6
Show file tree
Hide file tree
Showing 5 changed files with 1,855 additions and 94 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
WASM_BINDGEN_TEST_TIMEOUT: 60

jobs:
build:
check:
name: Cargo check
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -83,6 +83,34 @@ jobs:
- name: Cargo hack; check each feature/crate on its own
run: cargo hack --exclude subxt --exclude subxt-signer --exclude subxt-lightclient --exclude-all-features --each-feature check --workspace

# Check examples, which aren't a part of the workspace and so are otherwise missed:
- name: Cargo check examples
run: |
cargo check --manifest-path examples/parachain-example/Cargo.toml
wasm_check:
name: Cargo check (WASM)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f # v2.5.1

# Check WASM examples, which aren't a part of the workspace and so are otherwise missed:
- name: Cargo check WASM examples
run: |
cargo check --manifest-path examples/wasm-example/Cargo.toml
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
Expand Down Expand Up @@ -141,7 +169,7 @@ jobs:
command: test
args: --doc

nonwasm_tests:
tests:
name: "Test non-wasm"
runs-on: ubuntu-latest-16-cores
steps:
Expand Down Expand Up @@ -175,7 +203,7 @@ jobs:
command: nextest
args: run --workspace

nonwasm_light_client_tests:
light_client_tests:
name: "Test Light Client"
runs-on: ubuntu-latest-16-cores
timeout-minutes: 25
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ exclude = [
"testing/wasm-rpc-tests",
"testing/wasm-lightclient-tests",
"signer/wasm-tests",
"examples/wasm-example"
"examples/wasm-example",
"examples/parachain-example"
]
resolver = "2"

Expand Down
Loading

0 comments on commit 77eeda6

Please sign in to comment.