1
0

ci.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: CI
  2. on:
  3. push:
  4. branches: [ main, master, develop ]
  5. pull_request:
  6. branches: [ main, master, develop ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. rust-test:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: prepare
  15. run: rustup component add clippy
  16. - name: fmt
  17. run: make fmt
  18. - name: clippy
  19. run: make clippy
  20. - name: unit test
  21. run: make unit-test
  22. test-ubuntu-latest:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v3
  26. - name: prepare
  27. run: |
  28. rustup component add clippy
  29. sudo apt-get install tcl8.6 tclx
  30. - name: test
  31. run: make test
  32. check-code-coverage:
  33. name: Code coverage
  34. runs-on: ubuntu-latest
  35. steps:
  36. - name: Checkout repository
  37. uses: actions/checkout@v2
  38. - name: Install stable toolchain
  39. uses: actions-rs/toolchain@v1
  40. with:
  41. toolchain: stable
  42. override: true
  43. - name: Run cargo-tarpaulin
  44. uses: actions-rs/tarpaulin@v0.1
  45. with:
  46. version: '0.15.0'
  47. args: '--all -v'
  48. out-type: 'Html'
  49. - name: Archive code coverage results
  50. uses: actions/upload-artifact@v1
  51. with:
  52. name: code-coverage-report
  53. path: tarpaulin-report.html