name: Cargo lint on: [push, pull_request] env: CARGO_INCREMENTAL: 0 jobs: fmt: name: fmt runs-on: ubuntu-latest env: RUST_LOG: "0" steps: - uses: actions/checkout@v3 # We explicitly do this to cache properly. - name: Install Rust uses: actions-rs/toolchain@v1 with: profile: minimal components: rustfmt - name: Run cargo fmt run: cargo fmt --all -- --check clippy: name: Clippy if: >- ${{ !contains(github.event.head_commit.message, 'chore: ') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Rust uses: actions-rs/toolchain@v1 with: profile: minimal components: clippy - uses: actions/setup-node@v3 with: node-version: "16" cache: "yarn" - name: Install node dependencies shell: bash run: | yarn - name: Check run: | cargo clippy --all