AppFlowy/.github/workflows/rust_lint.yml
2022-08-09 13:11:39 +08:00

52 lines
1.1 KiB
YAML

name: Rust lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
rust-fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 'stable-2022-01-20'
override: true
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.0.5'
channel: "stable"
- name: Rust Deps
working-directory: frontend
run: |
cargo install cargo-make
cargo make flowy_dev
- name: Build FlowySDK
working-directory: frontend
run: |
cargo make --profile development-linux-x86_64 flowy-sdk-dev
- run: rustup component add rustfmt
working-directory: frontend/rust-lib
- name: rustfmt
run: cargo fmt --all -- --check
working-directory: frontend/rust-lib/
- run: rustup component add clippy
working-directory: frontend/rust-lib
- name: clippy
run: cargo clippy --no-default-features
working-directory: frontend/rust-lib