AppFlowy/.github/workflows/dart_lint.yml

85 lines
2.3 KiB
YAML
Raw Normal View History

2021-11-29 13:49:22 +00:00
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
2022-02-10 01:15:16 +00:00
name: Flutter lint
2021-11-29 13:49:22 +00:00
on:
push:
branches:
- "main"
paths:
- "frontend/app_flowy/**"
2021-11-29 13:49:22 +00:00
pull_request:
branches:
- "main"
paths:
- "frontend/app_flowy/**"
2021-11-29 13:49:22 +00:00
env:
CARGO_TERM_COLOR: always
jobs:
2021-11-29 13:49:22 +00:00
flutter-analyze:
name: flutter analyze
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
flutter-version: "3.0.5"
2022-02-09 12:56:29 +00:00
channel: "stable"
2022-06-15 12:55:55 +00:00
- uses: actions-rs/toolchain@v1
with:
toolchain: "stable-2022-01-20"
2022-06-15 12:31:28 +00:00
- name: Cache Cargo
id: cache-cargo
uses: actions/cache@v2
with:
path: |
~/.cargo
key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
- name: Cache Rust
id: cache-rust-target
uses: actions/cache@v2
with:
path: |
frontend/rust-lib/target
shared-lib/target
key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
- if: steps.cache-cargo.outputs.cache-hit != 'true'
name: Rust Deps
2022-06-15 12:31:28 +00:00
working-directory: frontend
run: |
cargo install cargo-make
- name: Cargo make flowy dev
working-directory: frontend
run: |
2022-06-15 12:31:28 +00:00
cargo make flowy_dev
2022-06-15 12:55:55 +00:00
- name: Flutter Deps
2022-02-24 07:40:48 +00:00
run: flutter packages pub get
working-directory: frontend/app_flowy
2022-06-15 12:55:55 +00:00
2022-06-15 13:08:29 +00:00
- name: Build FlowySDK
working-directory: frontend
run: |
cargo make --profile development-linux-x86_64 flowy-sdk-dev
2022-06-15 13:08:29 +00:00
2022-02-24 07:40:48 +00:00
- name: Code Generation
2021-11-29 13:49:22 +00:00
working-directory: frontend/app_flowy
2022-02-23 13:32:53 +00:00
run: |
2022-04-28 12:10:12 +00:00
flutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
2022-02-23 13:32:53 +00:00
flutter packages pub run build_runner build --delete-conflicting-outputs
2022-06-15 12:55:55 +00:00
2022-02-24 07:40:48 +00:00
- name: Run Flutter Analyzer
2021-11-29 13:49:22 +00:00
working-directory: frontend/app_flowy
run: flutter analyze