rust.yml 771 B

1234567891011121314151617181920212223242526272829303132333435
  1. name: Rust
  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. - uses: actions-rs/toolchain@v1
  15. with:
  16. profile: minimal
  17. toolchain: stable
  18. components: clippy
  19. - uses: Swatinem/rust-cache@v1
  20. - name: Clippy
  21. run: cargo clippy -- -D warnings
  22. - name: Build
  23. run: cargo build --verbose
  24. - name: Build with features
  25. run: |
  26. cargo build --no-default-features --features client,server
  27. cargo build --no-default-features --features client,tls
  28. cargo build --no-default-features --features server,tls
  29. - name: Run tests
  30. run: cargo test --verbose