general.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: Rust
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. rust-fmt:
  11. name: Rustfmt
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v2
  15. - uses: actions-rs/toolchain@v1
  16. with:
  17. toolchain: stable
  18. override: true
  19. components: rustfmt
  20. - uses: actions-rs/cargo@v1
  21. with:
  22. command: fmt
  23. args: --all -- --check
  24. rust-clippy:
  25. runs-on: ubuntu-latest
  26. name: Clippy
  27. steps:
  28. - uses: actions/checkout@v2
  29. - id: component
  30. uses: actions-rs/components-nightly@v1
  31. with:
  32. component: clippy
  33. - uses: actions-rs/toolchain@v1
  34. with:
  35. toolchain: ${{ steps.component.outputs.toolchain }}
  36. override: true
  37. - run: rustup component add clippy
  38. working-directory: frontend/rust-lib
  39. - run: cargo clippy
  40. working-directory: frontend/rust-lib
  41. flutter-analyze:
  42. name: flutter analyze
  43. runs-on: ubuntu-latest
  44. steps:
  45. - name: Checkout
  46. uses: actions/checkout@v2
  47. - uses: subosito/flutter-action@v1
  48. with:
  49. channel: "dev"
  50. - name: flutter pub get
  51. working-directory: frontend/app_flowy
  52. run: flutter pub get
  53. - name: flutter analyze
  54. working-directory: frontend/app_flowy
  55. run: flutter analyze