Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Update to v0.9.43

Update to v0.9.43 #286

Workflow file for this run

# This CI Tries to be both simple and effective. It is inspired by:
# https://github.com/marketplace/actions/rust-cache
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659
# https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
name: Rust Checks
on:
pull_request:
push:
branches:
- main
jobs:
check-cargo-toml-format:
name: "Check Cargo.toml files format"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# With rustup's nice new toml format, we just need to run rustup show to install the toolchain
# https://github.com/actions-rs/toolchain/issues/126#issuecomment-782989659
- name: Setup Rust toolchain
run: rustup show
- name: Check Cargo.toml files format with toml_sort
run: chmod u+x ./scripts/check-cargo-toml-files-format.sh && ./scripts/check-cargo-toml-files-format.sh
check-rust-fmt:
name: Check rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup rust toolchain
run: rustup show
- name: Run cargo fmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
cargo-check:
name: Cargo check
runs-on: ubuntu-latest
steps:
- name: Install tooling
run: |
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Checkout sources
uses: actions/checkout@v2
- name: Setup rust toolchain
run: rustup show
- name: Rust Cache
uses: Swatinem/rust-cache@v1
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
check-copyright:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Find un-copyrighted files
run: |
find . -name '*.rs' -not -path "*/parachain-template/*" -exec grep -H -E -o -c Copyright {} \; | grep ':0' || true
FILECOUNT=$(find . -name '*.rs' -not -path "*/parachain-template/*" -exec grep -H -E -o -c 'Copyright' {} \; | grep -c ':0' || true)
if [[ $FILECOUNT -eq 0 ]]; then
true
else
false
fi