rust.yml 591 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Build
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Build
  15. run: cargo build --verbose
  16. - name: Run tests
  17. run: cargo test --verbose
  18. # As discussed, these tasks are optional for PRs.
  19. style_checks:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Rustfmt
  24. run: cargo fmt -- --check
  25. - name: Clippy
  26. run: cargo clippy
  27. - name: Rustdoc
  28. run: cargo doc