dart_test.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Unit test(Flutter)
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. tests:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout
  14. uses: actions/checkout@v2
  15. - uses: subosito/flutter-action@v1
  16. with:
  17. channel: "stable"
  18. - uses: actions-rs/toolchain@v1
  19. with:
  20. toolchain: stable
  21. - name: Deps Flutter
  22. run: |
  23. flutter config --enable-linux-desktop
  24. flutter doctor
  25. working-directory: frontend/app_flowy
  26. - name: Deps Rust
  27. working-directory: frontend
  28. run: |
  29. cargo install --force cargo-make
  30. cargo install --force duckscript_cli
  31. cargo make flowy_dev
  32. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  33. - name: Code Generation
  34. working-directory: frontend/app_flowy
  35. run: |
  36. flutter packages pub get
  37. flutter packages pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
  38. flutter packages pub run build_runner build --delete-conflicting-outputs
  39. - name: Build FlowySDK
  40. working-directory: frontend
  41. run: |
  42. cargo make --profile development-linux-x86 flowy-sdk-dev
  43. - name: Run bloc tests
  44. working-directory: frontend/app_flowy
  45. run: |
  46. flutter pub get
  47. flutter test