ci.yaml 1017 B

12345678910111213141516171819202122232425262728293031323334353637
  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