dart_test.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 Rust
  22. working-directory: frontend
  23. run: |
  24. cargo install --force cargo-make
  25. cargo install --force duckscript_cli
  26. cargo make flowy_dev
  27. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  28. - name: Deps Flutter
  29. working-directory: frontend/app_flowy
  30. run:
  31. flutter pub get
  32. flutter pub run easy_localization:generate --source-dir ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
  33. - name: Build FlowySDK
  34. working-directory: frontend
  35. run: |
  36. flutter config --enable-linux-desktop
  37. cargo make --profile development-linux-x86 flowy-sdk-dev
  38. - name: Bloc Test
  39. working-directory: frontend/app_flowy
  40. run: |
  41. flutter test