dart_lint.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # This workflow uses actions that are not certified by GitHub.
  2. # They are provided by a third-party and are governed by
  3. # separate terms of service, privacy policy, and support
  4. # documentation.
  5. name: Flutter lint
  6. on:
  7. push:
  8. branches:
  9. - "main"
  10. paths:
  11. - "frontend/app_flowy/**"
  12. pull_request:
  13. branches:
  14. - "main"
  15. paths:
  16. - "frontend/app_flowy/**"
  17. env:
  18. CARGO_TERM_COLOR: always
  19. jobs:
  20. flutter-analyze:
  21. name: flutter analyze
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout
  25. uses: actions/checkout@v2
  26. - uses: subosito/flutter-action@v1
  27. with:
  28. flutter-version: "3.0.5"
  29. channel: "stable"
  30. - uses: actions-rs/toolchain@v1
  31. with:
  32. toolchain: "stable-2022-04-07"
  33. - name: Cache Cargo
  34. id: cache-cargo
  35. uses: actions/cache@v2
  36. with:
  37. path: |
  38. ~/.cargo
  39. key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  40. - name: Cache Rust
  41. id: cache-rust-target
  42. uses: actions/cache@v2
  43. with:
  44. path: |
  45. frontend/rust-lib/target
  46. shared-lib/target
  47. key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}
  48. - if: steps.cache-cargo.outputs.cache-hit != 'true'
  49. name: Rust Deps
  50. working-directory: frontend
  51. run: |
  52. cargo install cargo-make
  53. - name: Cargo make flowy dev
  54. working-directory: frontend
  55. run: |
  56. cargo make flowy_dev
  57. - name: Flutter Deps
  58. run: flutter packages pub get
  59. working-directory: frontend/app_flowy
  60. - name: Build FlowySDK
  61. working-directory: frontend
  62. run: |
  63. cargo make --profile development-linux-x86_64 flowy-sdk-dev
  64. - name: Code Generation
  65. working-directory: frontend/app_flowy
  66. run: |
  67. flutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
  68. flutter packages pub run build_runner build --delete-conflicting-outputs
  69. - name: Run Flutter Analyzer
  70. working-directory: frontend/app_flowy
  71. run: flutter analyze