-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* uplift to polkadot-v0.9.42 * fmt * free up space on runner to make CI pass * fix xcm_config after rebase * Add pallet-motion benchmarks * Remove frontier offchain DB on purge-chain command (#12) * fmt * runtime fixes
- Loading branch information
Showing
18 changed files
with
1,732 additions
and
1,250 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 |
---|---|---|
@@ -1,49 +1,60 @@ | ||
name: Test Code | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [synchronize, ready_for_review] | ||
push: | ||
branches: | ||
- main | ||
- main | ||
|
||
jobs: | ||
test-code: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
|
||
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo | ||
- name: Cache cargo registry | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rustfmt, clippy | ||
target: wasm32-unknown-unknown | ||
override: true | ||
default: true | ||
- name: Free up space on runner | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Rust Setup | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Install protoc | ||
run: | | ||
sudo apt-get install -y protobuf-compiler | ||
protoc --version | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
toolchain: stable | ||
command: fmt | ||
args: --all --check | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2.5.0 | ||
with: | ||
cache-on-failure: true | ||
cache-all-crates: true | ||
|
||
- name: Check Build | ||
run: | | ||
cargo check --release | ||
- name: Run tests | ||
run: cargo test --release --locked --verbose --all | ||
|
||
# Enable this for clippy linting. | ||
# - name: Check and Lint Code | ||
# run: cargo +nightly clippy -- -D warnings | ||
|
||
- name: Check Code | ||
run: cargo check | ||
|
||
- name: Test Code | ||
run: cargo test | ||
# run: cargo clippy -- -D warnings |
Oops, something went wrong.