Skip to content

Commit

Permalink
Adds clippy to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Jan 2, 2021
1 parent f16e0fc commit aef170b
Showing 1 changed file with 45 additions and 5 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/ci-branches.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: CI - Branches
on:
push:
branches-ignore:
- 'master'
name: CI
on: [push, pull_request]
env:
RUST_BACKTRACE: 1

Expand All @@ -28,6 +25,49 @@ jobs:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
strategy:
matrix:
rust:
- stable
- nightly

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: clippy

- name: Check examples
uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples --all

- name: Check examples with all features on stable
uses: actions-rs/cargo@v1
with:
command: clippy
args: --examples --all-features --all
if: matrix.rust == 'stable'

- name: Check benchmarks on nightly
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --examples --all --benches
if: matrix.rust == 'nightly'

test:
name: Check Tests (Simple)
runs-on: [self-hosted, snarkos-ci1]
Expand Down

0 comments on commit aef170b

Please sign in to comment.