run-integration-tests.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. name: Run Integration Tests
  2. concurrency:
  3. group: ${{ github.workflow }}-${{ github.ref }}
  4. cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
  5. on:
  6. push:
  7. branches:
  8. - main
  9. paths-ignore:
  10. - '**/*.md'
  11. - 'frontend/**'
  12. - 'docs/**'
  13. - 'evaluation/**'
  14. pull_request:
  15. env:
  16. PERSIST_SANDBOX : "false"
  17. jobs:
  18. integration-tests-on-linux:
  19. name: Integration Tests on Linux
  20. runs-on: ubuntu-latest
  21. strategy:
  22. fail-fast: false
  23. matrix:
  24. python-version: ["3.11"]
  25. sandbox: ["ssh", "exec", "local"]
  26. steps:
  27. - uses: actions/checkout@v4
  28. - name: Install poetry via pipx
  29. run: pipx install poetry
  30. - name: Set up Python
  31. uses: actions/setup-python@v5
  32. with:
  33. python-version: ${{ matrix.python-version }}
  34. cache: 'poetry'
  35. - name: Install Python dependencies using Poetry
  36. run: poetry install
  37. - name: Build Environment
  38. run: make build
  39. - name: Run Integration Tests
  40. env:
  41. SANDBOX_TYPE: ${{ matrix.sandbox }}
  42. run: |
  43. TEST_IN_CI=true TEST_ONLY=true ./tests/integration/regenerate.sh
  44. - name: Upload coverage to Codecov
  45. uses: codecov/codecov-action@v4
  46. env:
  47. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
  48. integration-tests-on-mac:
  49. name: Integration Tests on MacOS
  50. runs-on: macos-13
  51. if: contains(github.event.pull_request.title, 'mac') || contains(github.event.pull_request.title, 'Mac')
  52. strategy:
  53. fail-fast: false
  54. matrix:
  55. python-version: ["3.11"]
  56. sandbox: ["ssh"]
  57. steps:
  58. - uses: actions/checkout@v4
  59. - name: Install poetry via pipx
  60. run: pipx install poetry
  61. - name: Set up Python
  62. uses: actions/setup-python@v5
  63. with:
  64. python-version: ${{ matrix.python-version }}
  65. cache: 'poetry'
  66. - name: Install Python dependencies using Poetry
  67. run: poetry install
  68. - name: Install & Start Docker
  69. run: |
  70. brew install colima docker
  71. colima start
  72. # For testcontainers to find the Colima socket
  73. # https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
  74. sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
  75. - name: Build Environment
  76. run: make build
  77. - name: Run Integration Tests
  78. env:
  79. SANDBOX_TYPE: ${{ matrix.sandbox }}
  80. run: |
  81. TEST_IN_CI=true TEST_ONLY=true ./tests/integration/regenerate.sh
  82. - name: Upload coverage to Codecov
  83. uses: codecov/codecov-action@v4
  84. env:
  85. CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}