test.yml 746 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: test
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. test:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. rust:
  15. - version: stable
  16. build-args:
  17. [
  18. -p cdk,
  19. ]
  20. steps:
  21. - name: Checkout Crate
  22. uses: actions/checkout@v3
  23. - name: Cache
  24. uses: actions/cache@v3
  25. with:
  26. path: |
  27. ~/.cargo/registry
  28. ~/.cargo/git
  29. target
  30. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
  31. - name: Set default toolchain
  32. run: rustup default ${{ matrix.rust.version }}
  33. - name: Test
  34. run: cargo test ${{ matrix.build-args }}