main.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. check:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - uses: actions-rs/toolchain@v1
  9. with:
  10. profile: minimal
  11. toolchain: stable
  12. components: rustfmt, clippy
  13. - name: Check code format
  14. uses: actions-rs/cargo@v1
  15. with:
  16. command: fmt
  17. args: --all -- --check
  18. - name: Clippy
  19. uses: actions-rs/cargo@v1
  20. with:
  21. command: clippy
  22. build:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v2
  26. - uses: actions-rs/toolchain@v1
  27. with:
  28. profile: minimal
  29. toolchain: stable
  30. - name: Build
  31. uses: actions-rs/cargo@v1
  32. with:
  33. command: build
  34. args: --all-features
  35. - name: Docs
  36. uses: actions-rs/cargo@v1
  37. with:
  38. command: doc
  39. - name: Test
  40. uses: actions-rs/cargo@v1
  41. with:
  42. command: test
  43. args: --all-features