Skip to content

Commit

Permalink
Improve clippy CI performance (paritytech#239)
Browse files Browse the repository at this point in the history
* Specify --release when running clippy in CI

* Move code checks into build job
  • Loading branch information
notlesh authored Feb 11, 2021
1 parent de8951a commit d810d7f
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,36 +100,6 @@ jobs:
- name: Check with Prettier
run: npx prettier --check --ignore-path .gitignore '**/*.(yml|js|ts|json)'

check-clippy:
name: "Code checks"
runs-on: self-hosted
steps:
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Checkout
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2020-10-03
components: clippy, rustfmt
target: wasm32-unknown-unknown
default: true

- name: Check with Clippy
run: cargo clippy --workspace

- name: Format code with rustfmt
run: cargo fmt -- --check

####### Building and Testing binaries #######

build:
Expand Down Expand Up @@ -209,6 +179,10 @@ jobs:
with:
name: moonbeam
path: build
- name: Check with Clippy
run: cargo clippy --release --workspace
- name: Format code with rustfmt
run: cargo fmt -- --check

####### Prepare and Deploy Docker images #######

Expand Down

0 comments on commit d810d7f

Please sign in to comment.