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.

48 lines
1.2 KiB

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. - stable
  14. - beta
  15. - nightly
  16. steps:
  17. - uses: actions/checkout@v4
  18. - name: Install Rust ${{ matrix.rust }}
  19. run: rustup toolchain install ${{ matrix.rust }}
  20. - name: Run cargo build
  21. run: cargo +${{ matrix.rust }} build --verbose
  22. - name: Run cargo test
  23. run: cargo +${{ matrix.rust }} test --verbose
  24. formatting:
  25. name: Cargo fmt
  26. runs-on: ubuntu-latest
  27. steps:
  28. - uses: actions/checkout@v4
  29. - name: Update Rust
  30. run: rustup update stable
  31. - name: Run cargo fmt
  32. run: cargo +stable fmt --all -- --check
  33. clippy:
  34. name: Clippy
  35. runs-on: ubuntu-latest
  36. steps:
  37. - uses: actions/checkout@v4
  38. - name: Update Rust
  39. run: rustup update stable
  40. - name: Run clippy
  41. run: cargo +stable clippy --all-features
  42. cargo-deny:
  43. name: Check dependencies
  44. runs-on: ubuntu-latest
  45. steps:
  46. - uses: actions/checkout@v4
  47. - uses: EmbarkStudios/cargo-deny-action@v1