mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 16:42:28 +03:00
42 lines
757 B
YAML
42 lines
757 B
YAML
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@v2
|
|
|
|
# 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
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
components: clippy
|
|
|
|
- name: Check
|
|
run: |
|
|
cargo clippy --all
|