main.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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
  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
  33. - name: Install cargo-make
  34. uses: actions-rs/cargo@v1
  35. with:
  36. command: install
  37. args: --debug cargo-make
  38. - uses: actions-rs/cargo@v1
  39. - uses: browser-actions/setup-firefox@latest
  40. with:
  41. command: make
  42. args: tests
  43. fmt:
  44. name: Rustfmt
  45. runs-on: ubuntu-latest
  46. steps:
  47. - uses: actions/checkout@v2
  48. - uses: actions-rs/toolchain@v1
  49. with:
  50. profile: minimal
  51. toolchain: stable
  52. override: true
  53. - uses: Swatinem/rust-cache@v1
  54. - run: rustup component add rustfmt
  55. - uses: actions-rs/cargo@v1
  56. with:
  57. command: fmt
  58. args: --all -- --check
  59. clippy:
  60. name: Clippy
  61. runs-on: ubuntu-latest
  62. steps:
  63. - uses: actions/checkout@v2
  64. - uses: actions-rs/toolchain@v1
  65. with:
  66. profile: minimal
  67. toolchain: stable
  68. override: true
  69. - uses: Swatinem/rust-cache@v1
  70. - run: sudo apt-get update
  71. - run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev
  72. - run: rustup component add clippy
  73. - uses: actions-rs/cargo@v1
  74. with:
  75. command: clippy
  76. args: -- -D warnings