rust.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. on: push
  2. name: CI Build
  3. jobs:
  4. ci:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. rust:
  9. - stable
  10. - beta
  11. - nightly
  12. steps:
  13. - uses: actions/checkout@v1
  14. - uses: actions-rs/toolchain@v1
  15. with:
  16. profile: minimal
  17. toolchain: ${{ matrix.rust }}
  18. override: true
  19. components: rustfmt, clippy
  20. - uses: actions-rs/cargo@v1
  21. with:
  22. command: build
  23. args: --release
  24. - uses: actions-rs/cargo@v1
  25. with:
  26. command: test
  27. args: --release
  28. - uses: actions-rs/cargo@v1
  29. with:
  30. command: fmt
  31. args: --all -- --check
  32. - uses: actions-rs/cargo@v1
  33. with:
  34. command: clippy
  35. args: -- -D warnings
  36. - name: Run cargo-tarpaulin
  37. uses: actions-rs/tarpaulin@v0.1
  38. if: ${{ matrix.rust == 'stable' }}
  39. with:
  40. version: '0.15.0'
  41. out-type: Xml
  42. run-types: 'Tests'
  43. args: '-- --test-threads 1'
  44. - name: Upload to codecov.io
  45. uses: codecov/codecov-action@v1.0.2
  46. if: ${{ matrix.rust == 'stable' }}
  47. with:
  48. token: ${{ secrets.CODECOV_SECRET }}
  49. - name: Archive code coverage results
  50. uses: actions/upload-artifact@v1
  51. if: ${{ matrix.rust == 'stable' }}
  52. with:
  53. name: code-coverage-report
  54. path: cobertura.xml
  55. - name: Archive build
  56. uses: actions/upload-artifact@v2
  57. with:
  58. name: receqif
  59. path: target/release/receqif