dart_test.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. run: flutter pub get
  30. working-directory: frontend/app_flowy
  31. - name: Code Generate
  32. working-directory: frontend/app_flowy
  33. run:
  34. flutter pub run easy_localization:generate --source-dir ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
  35. - name: Build FlowySDK
  36. working-directory: frontend
  37. run: |
  38. flutter config --enable-linux-desktop
  39. cargo make --profile development-linux-x86 flowy-sdk-dev
  40. - name: Run bloc tests
  41. working-directory: frontend/app_flowy
  42. run: |
  43. flutter test