1
0

main.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. on: [push, pull_request]
  2. name: Rust CI
  3. jobs:
  4. check:
  5. name: Check
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v2
  9. - uses: actions-rs/toolchain@v1
  10. with:
  11. profile: minimal
  12. toolchain: stable
  13. override: true
  14. - uses: Swatinem/rust-cache@v1
  15. - run: sudo apt-get update
  16. - run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev libappindicator3-dev
  17. - uses: actions-rs/cargo@v1
  18. with:
  19. command: check
  20. test:
  21. name: Test Suite
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: actions-rs/toolchain@v1
  26. with:
  27. profile: minimal
  28. toolchain: stable
  29. override: true
  30. - uses: Swatinem/rust-cache@v1
  31. - run: sudo apt-get update
  32. - run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev libappindicator3-dev
  33. - uses: actions-rs/cargo@v1
  34. with:
  35. command: test
  36. args: --features "desktop, ssr, router"
  37. fmt:
  38. name: Rustfmt
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v2
  42. - uses: actions-rs/toolchain@v1
  43. with:
  44. profile: minimal
  45. toolchain: stable
  46. override: true
  47. - uses: Swatinem/rust-cache@v1
  48. - run: rustup component add rustfmt
  49. - uses: actions-rs/cargo@v1
  50. with:
  51. command: fmt
  52. args: --all -- --check
  53. # clippy:
  54. # name: Clippy
  55. # runs-on: ubuntu-latest
  56. # steps:
  57. # - uses: actions/checkout@v2
  58. # - uses: actions-rs/toolchain@v1
  59. # with:
  60. # profile: minimal
  61. # toolchain: stable
  62. # override: true
  63. # - uses: Swatinem/rust-cache@v1
  64. # - run: rustup component add clippy
  65. # - uses: actions-rs/cargo@v1
  66. # with:
  67. # command: clippy
  68. # args: -- -D warnings
  69. #
  70. # sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev libappindicator3-dev