-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4124261
commit 57f9353
Showing
8 changed files
with
102 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: "ci tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- plain-cumulus-template | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
workflow_dispatch: | ||
inputs: | ||
test-macos-and-windows: | ||
description: "run macOS and Windows tests" | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
env: | ||
# Not needed in CI, should make things a bit faster | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_TERM_COLOR: always | ||
# Remove unnecessary WASM build artefacts | ||
WASM_BUILD_CLEAN_TARGET: 1 | ||
|
||
jobs: | ||
clippy-fmt-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- macos-12 | ||
- windows-2022 | ||
run-all: | ||
- ${{ inputs.test-macos-and-windows == true || github.ref == 'refs/heads/main' }} | ||
exclude: # exclude macos-12 and windows-2022 when the condition is false | ||
- run-all: false | ||
os: macos-12 | ||
- run-all: false | ||
os: windows-2022 | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9 # v2.0.0 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: install rust toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: cargo test --release --locked | ||
run: cargo test | ||
|
||
- name: cargo clippy --release --locked | ||
run: cargo clippy --locked --all-targets -- -D warnings | ||
|
||
- name: Check Documentation | ||
run: cargo doc --locked --all --no-deps | ||
env: | ||
RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,7 @@ try-runtime = [ | |
"polkadot-cli/try-runtime", | ||
"sp-runtime/try-runtime", | ||
] | ||
|
||
|
||
[lints] | ||
workspace = true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[toolchain] | ||
channel = "nightly-2023-09-21" | ||
targets = ["wasm32-unknown-unknown"] | ||
components = ["rustfmt", "clippy"] |
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