2022-01-13 17:06:11 +03:00
|
|
|
name: Cargo lint
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
|
|
|
name: fmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
RUST_LOG: "0"
|
|
|
|
steps:
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-13 17:06:11 +03:00
|
|
|
|
|
|
|
# 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
|
2022-02-27 09:27:15 +03:00
|
|
|
if: >-
|
|
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
2022-01-13 17:06:11 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-13 17:06:11 +03:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
components: clippy
|
|
|
|
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2022-03-11 15:49:53 +03:00
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
- name: Install node dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
yarn
|
|
|
|
|
2022-01-13 17:06:11 +03:00
|
|
|
- name: Check
|
|
|
|
run: |
|
|
|
|
cargo clippy --all
|