dart_lint.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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:
  9. - "main"
  10. - "release/*"
  11. paths:
  12. - "frontend/app_flowy/**"
  13. pull_request:
  14. branches:
  15. - "main"
  16. - "release/*"
  17. paths:
  18. - "frontend/app_flowy/**"
  19. env:
  20. CARGO_TERM_COLOR: always
  21. jobs:
  22. flutter-analyze:
  23. name: flutter analyze
  24. runs-on: ubuntu-latest
  25. steps:
  26. - name: Checkout
  27. uses: actions/checkout@v2
  28. - uses: subosito/flutter-action@v1
  29. with:
  30. flutter-version: "3.3.9"
  31. channel: "stable"
  32. - uses: actions-rs/toolchain@v1
  33. with:
  34. toolchain: "stable-2022-04-07"
  35. - name: Cache Cargo
  36. id: cache-cargo
  37. uses: actions/cache@v2
  38. with:
  39. path: |
  40. ~/.cargo
  41. key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  42. - name: Cache Rust
  43. id: cache-rust-target
  44. uses: actions/cache@v2
  45. with:
  46. path: |
  47. frontend/rust-lib/target
  48. shared-lib/target
  49. key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  50. - if: steps.cache-cargo.outputs.cache-hit != 'true'
  51. name: Rust Deps
  52. working-directory: frontend
  53. run: |
  54. cargo install cargo-make
  55. - name: Cargo make flowy dev
  56. working-directory: frontend
  57. run: |
  58. cargo make appflowy-deps-tools
  59. - name: Flutter Deps
  60. run: flutter packages pub get
  61. working-directory: frontend/app_flowy
  62. - name: Build FlowySDK
  63. working-directory: frontend
  64. run: |
  65. cargo make --profile development-linux-x86_64 appflowy-sdk-dev
  66. - name: Flutter Code Generation
  67. working-directory: frontend/app_flowy
  68. run: |
  69. flutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
  70. flutter packages pub run build_runner build --delete-conflicting-outputs
  71. - name: Run Flutter Analyzer
  72. working-directory: frontend/app_flowy
  73. run: flutter analyze