2022-02-10 01:15:16 +00:00
|
|
|
name: Rust lint
|
2021-11-29 13:46:04 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-09-02 13:40:28 +00:00
|
|
|
branches:
|
|
|
|
- "main"
|
2022-10-29 09:00:40 +00:00
|
|
|
- "release/*"
|
2022-09-02 13:40:28 +00:00
|
|
|
paths:
|
|
|
|
- "frontend/rust-lib/**"
|
|
|
|
- "shared-lib/**"
|
2022-02-09 13:13:51 +00:00
|
|
|
|
2022-09-02 13:40:28 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "main"
|
2022-10-29 09:00:40 +00:00
|
|
|
- "release/*"
|
2022-09-02 13:40:28 +00:00
|
|
|
paths:
|
|
|
|
- "frontend/rust-lib/**"
|
|
|
|
- "shared-lib/**"
|
2021-11-29 13:46:04 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rust-fmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-01 03:01:03 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
2022-07-27 02:25:44 +00:00
|
|
|
with:
|
2022-10-11 11:54:31 +00:00
|
|
|
toolchain: 'stable-2022-04-07'
|
2022-07-27 02:25:44 +00:00
|
|
|
override: true
|
2022-07-27 14:02:22 +00:00
|
|
|
- uses: subosito/flutter-action@v1
|
|
|
|
with:
|
2022-08-09 05:11:39 +00:00
|
|
|
flutter-version: '3.0.5'
|
2022-07-27 14:02:22 +00:00
|
|
|
channel: "stable"
|
2022-06-15 12:31:28 +00:00
|
|
|
|
|
|
|
- name: Rust Deps
|
|
|
|
working-directory: frontend
|
|
|
|
run: |
|
|
|
|
cargo install cargo-make
|
2022-11-26 14:18:39 +00:00
|
|
|
cargo make appflowy-deps-tools
|
2022-06-15 12:31:28 +00:00
|
|
|
|
2022-06-15 12:25:55 +00:00
|
|
|
- name: Build FlowySDK
|
|
|
|
working-directory: frontend
|
|
|
|
run: |
|
2022-11-26 14:18:39 +00:00
|
|
|
cargo make --profile development-linux-x86_64 appflowy-sdk-dev
|
2022-06-15 12:25:55 +00:00
|
|
|
|
2021-12-01 03:01:03 +00:00
|
|
|
- run: rustup component add rustfmt
|
2021-11-30 09:55:25 +00:00
|
|
|
working-directory: frontend/rust-lib
|
2022-06-15 12:25:55 +00:00
|
|
|
- name: rustfmt
|
|
|
|
run: cargo fmt --all -- --check
|
2021-12-01 03:01:03 +00:00
|
|
|
working-directory: frontend/rust-lib/
|
|
|
|
|
2021-11-30 07:40:11 +00:00
|
|
|
|
2021-11-29 13:46:04 +00:00
|
|
|
- run: rustup component add clippy
|
2022-07-27 02:25:44 +00:00
|
|
|
working-directory: frontend/rust-lib
|
2022-06-15 12:25:55 +00:00
|
|
|
- name: clippy
|
|
|
|
run: cargo clippy --no-default-features
|
2021-11-29 13:46:04 +00:00
|
|
|
working-directory: frontend/rust-lib
|
2022-06-15 12:25:55 +00:00
|
|
|
|