dart_test.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
  35. sed -i '/generate: true/s/true/false/g' pubspec.yaml
  36. flutter pub get
  37. flutter packages pub run build_runner build --delete-conflicting-outputs
  38. - name: Build FlowySDK
  39. working-directory: frontend
  40. run: |
  41. flutter config --enable-linux-desktop
  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 test