tests.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. on:
  2. push:
  3. branches:
  4. - main
  5. paths:
  6. - '**.rs'
  7. - '**/Cargo.toml'
  8. - '.github/workflows/tests.yml'
  9. workflow_dispatch:
  10. pull_request:
  11. paths:
  12. - '**.rs'
  13. - '**/Cargo.toml'
  14. - '.github/workflows/tests.yml'
  15. name: Tests
  16. jobs:
  17. tests:
  18. name: Tests
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v2
  22. - name: Install stable toolchain
  23. uses: actions-rs/toolchain@v1
  24. with:
  25. profile: minimal
  26. toolchain: stable
  27. override: true
  28. components: rustfmt
  29. - name: Run cargo test
  30. uses: actions-rs/cargo@v1
  31. with:
  32. command: test
  33. benches:
  34. name: Compile benchmarks
  35. runs-on: ubuntu-latest
  36. steps:
  37. - uses: actions/checkout@v2
  38. - name: Install stable toolchain
  39. uses: actions-rs/toolchain@v1
  40. with:
  41. profile: minimal
  42. toolchain: stable
  43. override: true
  44. components: rustfmt
  45. - name: Run cargo check
  46. uses: actions-rs/cargo@v1
  47. with:
  48. command: check
  49. args: -p bench --benches