From ed117c4d317c2f505d36bdd5c659e915b801d241 Mon Sep 17 00:00:00 2001 From: "AppFlowy.IO" <86001920+appflowy@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:46:04 +0800 Subject: [PATCH] Create general.yml --- .github/workflows/general.yml | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/general.yml diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml new file mode 100644 index 0000000000..dd4eccf3bb --- /dev/null +++ b/.github/workflows/general.yml @@ -0,0 +1,59 @@ +name: Rust + +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 + override: true + components: rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + rust-clippy: + runs-on: ubuntu-latest + name: Clippy + steps: + - uses: actions/checkout@v2 + - id: component + uses: actions-rs/components-nightly@v1 + with: + component: clippy + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ steps.component.outputs.toolchain }} + override: true + - run: rustup component add clippy + working-directory: frontend/rust-lib + - run: cargo clippy + working-directory: frontend/rust-lib + + flutter-analyze: + name: flutter analyze + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: subosito/flutter-action@v1 + with: + channel: "dev" + - name: flutter pub get + working-directory: frontend/app_flowy + run: flutter pub get + - name: flutter analyze + working-directory: frontend/app_flowy + run: flutter analyze