name: CI on: push: pull_request: branches: [ master ] env: CARGO_TERM_COLOR: always jobs: style: name: Check style runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: stable components: rustfmt profile: minimal override: true - name: Cargo fmt uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check clippy: name: Run clippy needs: [style] runs-on: ubuntu-latest steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: stable components: clippy profile: minimal override: true - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy args: --all-targets -- -D warnings