ci.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: CI
  2. on:
  3. pull_request:
  4. branches: [main]
  5. jobs:
  6. preflight:
  7. name: License Header and Formatting Checks
  8. runs-on: ubuntu-latest
  9. container:
  10. image: swift:6.0-jammy
  11. steps:
  12. - name: "Checkout repository"
  13. uses: actions/checkout@v4
  14. - name: Mark the workspace as safe
  15. run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
  16. - name: "Formatting, License Headers, and Generated Code check"
  17. run: |
  18. ./dev/sanity.sh
  19. unit-tests:
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. include:
  24. - image: swiftlang/swift:nightly-jammy
  25. - image: swift:6.0-jammy
  26. name: Build and Test on ${{ matrix.image }}
  27. runs-on: ubuntu-latest
  28. container:
  29. image: ${{ matrix.image }}
  30. steps:
  31. - uses: actions/checkout@v4
  32. - name: 🔧 Build
  33. run: swift build ${{ matrix.swift-build-flags }}
  34. timeout-minutes: 20
  35. - name: 🧪 Test
  36. run: swift test ${{ matrix.swift-test-flags }}
  37. timeout-minutes: 20
  38. integration-tests:
  39. strategy:
  40. fail-fast: false
  41. matrix:
  42. include:
  43. - image: swiftlang/swift:nightly-jammy
  44. - image: swift:6.0-jammy
  45. name: Run integration tests using ${{ matrix.image }}
  46. runs-on: ubuntu-latest
  47. container:
  48. image: ${{ matrix.image }}
  49. steps:
  50. - uses: actions/checkout@v4
  51. - name: Build performance tests
  52. run: ./dev/build-performance-tests.sh
  53. - name: Run interop tests
  54. run: ./dev/run-interop-tests.sh