dart_lint.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # This workflow uses actions that are not certified by GitHub.
  2. # They are provided by a third-party and are governed by
  3. # separate terms of service, privacy policy, and support
  4. # documentation.
  5. name: Flutter lint
  6. on:
  7. push:
  8. branches: [main]
  9. pull_request:
  10. branches: [main]
  11. env:
  12. CARGO_TERM_COLOR: always
  13. jobs:
  14. flutter-analyze:
  15. name: flutter analyze
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v2
  20. - uses: subosito/flutter-action@v1
  21. with:
  22. flutter-version: "3.0.5"
  23. channel: "stable"
  24. - uses: actions-rs/toolchain@v1
  25. with:
  26. toolchain: "stable-2022-01-20"
  27. - name: Cache Cargo
  28. id: cache-cargo
  29. uses: actions/cache@v2
  30. with:
  31. path: |
  32. ~/.cargo
  33. key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  34. - name: Cache Rust
  35. id: cache-rust-target
  36. uses: actions/cache@v2
  37. with:
  38. path: |
  39. frontend/rust-lib/target
  40. shared-lib/target
  41. key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  42. - if: steps.cache-cargo.outputs.cache-hit != 'true'
  43. name: Rust Deps
  44. working-directory: frontend
  45. run: |
  46. cargo install cargo-make
  47. - name: Cargo make flowy dev
  48. working-directory: frontend
  49. run: |
  50. cargo make flowy_dev
  51. - name: Flutter Deps
  52. run: flutter packages pub get
  53. working-directory: frontend/app_flowy
  54. - name: Build FlowySDK
  55. working-directory: frontend
  56. run: |
  57. cargo make --profile development-linux-x86_64 flowy-sdk-dev
  58. - name: Code Generation
  59. working-directory: frontend/app_flowy
  60. run: |
  61. flutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
  62. flutter packages pub run build_runner build --delete-conflicting-outputs
  63. - name: Run Flutter Analyzer
  64. working-directory: frontend/app_flowy
  65. run: flutter analyze