You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main-ci.yml 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Main CI Pipeline
  2. on:
  3. pull_request:
  4. branches: ["main"]
  5. push:
  6. branches: ["main"]
  7. permissions:
  8. contents: write
  9. pull-requests: write
  10. checks: write
  11. statuses: write
  12. concurrency:
  13. group: main-ci-${{ github.head_ref || github.run_id }}
  14. cancel-in-progress: true
  15. jobs:
  16. # Check which paths were changed to determine which tests to run
  17. check-changes:
  18. name: Check Changed Files
  19. runs-on: ubuntu-latest
  20. outputs:
  21. api-changed: ${{ steps.changes.outputs.api }}
  22. web-changed: ${{ steps.changes.outputs.web }}
  23. vdb-changed: ${{ steps.changes.outputs.vdb }}
  24. migration-changed: ${{ steps.changes.outputs.migration }}
  25. steps:
  26. - uses: actions/checkout@v4
  27. - uses: dorny/paths-filter@v3
  28. id: changes
  29. with:
  30. filters: |
  31. api:
  32. - 'api/**'
  33. - 'docker/**'
  34. - '.github/workflows/api-tests.yml'
  35. web:
  36. - 'web/**'
  37. vdb:
  38. - 'api/core/rag/datasource/**'
  39. - 'docker/**'
  40. - '.github/workflows/vdb-tests.yml'
  41. - 'api/uv.lock'
  42. - 'api/pyproject.toml'
  43. migration:
  44. - 'api/migrations/**'
  45. - '.github/workflows/db-migration-test.yml'
  46. # Run tests in parallel
  47. api-tests:
  48. name: API Tests
  49. needs: check-changes
  50. if: needs.check-changes.outputs.api-changed == 'true'
  51. uses: ./.github/workflows/api-tests.yml
  52. web-tests:
  53. name: Web Tests
  54. needs: check-changes
  55. if: needs.check-changes.outputs.web-changed == 'true'
  56. uses: ./.github/workflows/web-tests.yml
  57. style-check:
  58. name: Style Check
  59. uses: ./.github/workflows/style.yml
  60. vdb-tests:
  61. name: VDB Tests
  62. needs: check-changes
  63. if: needs.check-changes.outputs.vdb-changed == 'true'
  64. uses: ./.github/workflows/vdb-tests.yml
  65. db-migration-test:
  66. name: DB Migration Test
  67. needs: check-changes
  68. if: needs.check-changes.outputs.migration-changed == 'true'
  69. uses: ./.github/workflows/db-migration-test.yml