Skip to content

refac: run clippy for entire codebase #1

refac: run clippy for entire codebase

refac: run clippy for entire codebase #1

Workflow file for this run

name: Check Set-Up & Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: 3.20.1
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set-up Rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: registry-main-cache
cache-targets: false
cache-all-crates: false
cache-on-failure: true
save-if: ${{ github.ref_name == 'main' }}
- name: Install Rust toolchain
run: |
rustup set profile minimal
rustup show
- name: Ensure Rust formatting
id: rust-formatter
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Check code errors
id: rust-clippy
uses: actions-rs/clippy-check@v1
env:
SKIP_WASM_BUILD: 1
with:
args: >-
--color=always --timings -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
id: rust-test
env:
SKIP_WASM_BUILD: 1
run: cargo test
- name: Check Build for Benchmarking
run: |
pushd node
cargo check --features=runtime-benchmarks --release