You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

10 months ago
3 years ago
3 years ago
  1. name: ci
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Cargo build & test
  6. runs-on: ubuntu-latest
  7. strategy:
  8. matrix:
  9. rust:
  10. - 1.74.1
  11. - 1.75.0
  12. - 1.76.0
  13. - 1.77.0
  14. - stable
  15. - beta
  16. - nightly
  17. steps:
  18. - uses: actions/checkout@v4
  19. with:
  20. persist-credentials: false
  21. - name: Install Rust ${{ matrix.rust }}
  22. run: rustup toolchain install ${{ matrix.rust }}
  23. - name: Run cargo build
  24. run: cargo +${{ matrix.rust }} build --verbose
  25. - name: Run cargo test
  26. run: cargo +${{ matrix.rust }} test --verbose
  27. formatting:
  28. name: Cargo fmt
  29. runs-on: ubuntu-latest
  30. steps:
  31. - uses: actions/checkout@v4
  32. with:
  33. persist-credentials: false
  34. - name: Update Rust
  35. run: rustup update stable
  36. - name: Run cargo fmt
  37. run: cargo +stable fmt --all -- --check
  38. clippy:
  39. name: Clippy
  40. runs-on: ubuntu-latest
  41. steps:
  42. - uses: actions/checkout@v4
  43. with:
  44. persist-credentials: false
  45. - name: Update Rust
  46. run: rustup update stable
  47. - name: Run clippy
  48. run: cargo +stable clippy --all-features
  49. cargo-deny:
  50. name: Check dependencies
  51. runs-on: ubuntu-latest
  52. steps:
  53. - uses: actions/checkout@v4
  54. with:
  55. persist-credentials: false
  56. - uses: EmbarkStudios/cargo-deny-action@v1