dart_test.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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: flutter packages pub get
  23. working-directory: frontend/app_flowy
  24. - name: Deps Rust
  25. working-directory: frontend
  26. run: |
  27. cargo install --force cargo-make
  28. cargo install --force duckscript_cli
  29. cargo make flowy_dev
  30. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  31. - name: Code Generation
  32. working-directory: frontend/app_flowy
  33. run: |
  34. flutter packages pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
  35. flutter packages pub run build_runner build --delete-conflicting-outputs
  36. - name: Build FlowySDK
  37. working-directory: frontend
  38. run: |
  39. flutter config --enable-linux-desktop
  40. cargo make --profile development-linux-x86 flowy-sdk-dev
  41. - name: Run bloc tests
  42. working-directory: frontend/app_flowy
  43. run: |
  44. flutter test