test.yml 784 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. -p cdk-integration-tests,
  20. ]
  21. steps:
  22. - name: Checkout Crate
  23. uses: actions/checkout@v3
  24. - name: Cache
  25. uses: actions/cache@v3
  26. with:
  27. path: |
  28. ~/.cargo/registry
  29. ~/.cargo/git
  30. target
  31. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
  32. - name: Set default toolchain
  33. run: rustup default ${{ matrix.rust.version }}
  34. - name: Test
  35. run: cargo test ${{ matrix.build-args }}