diff --git a/.github/workflows/python-integration-tests.yml b/.github/workflows/python-integration-tests.yml index 3a3678529b5d..97cba79a29b5 100644 --- a/.github/workflows/python-integration-tests.yml +++ b/.github/workflows/python-integration-tests.yml @@ -16,6 +16,10 @@ on: permissions: contents: read +env: + # Configure a constant location for the uv cache + UV_CACHE_DIR: /tmp/.uv-cache + jobs: paths-filter: runs-on: ubuntu-latest @@ -49,9 +53,9 @@ jobs: matrix: python-version: ["3.11"] os: [ubuntu-latest] - env: - # Configure a constant location for the uv cache - UV_CACHE_DIR: /tmp/.uv-cache + defaults: + run: + working-directory: python steps: - uses: actions/checkout@v4 - name: Set up uv @@ -145,25 +149,16 @@ jobs: VERTEX_AI_GEMINI_MODEL_ID: ${{ vars.VERTEX_AI_GEMINI_MODEL_ID }} VERTEX_AI_EMBEDDING_MODEL_ID: ${{ vars.VERTEX_AI_EMBEDDING_MODEL_ID }} REDIS_CONNECTION_STRING: ${{ vars.REDIS_CONNECTION_STRING }} - run: | - cd python + run: | uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration ./tests/samples -v --junitxml=pytest.xml - name: Surface failing tests if: always() uses: pmeier/pytest-results-action@main with: - # A list of JUnit XML files, directories containing the former, and wildcard - # patterns to process. - # See @actions/glob for supported patterns. path: python/pytest.xml - # (Optional) Add a summary of the results at the top of the report summary: true - # (Optional) Select which results should be included in the report. - # Follows the same syntax as `pytest -r` display-options: fEX - # (Optional) Fail the workflow if no JUnit XML was found. fail-on-empty: true - # (Optional) Title of the test results section in the workflow summary title: Test results - name: Minimize uv cache run: uv cache prune --ci @@ -178,6 +173,9 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12"] os: [ubuntu-latest, windows-latest, macos-latest] + defaults: + run: + working-directory: python steps: - uses: actions/checkout@v4 - name: Set up uv @@ -273,24 +271,15 @@ jobs: VERTEX_AI_EMBEDDING_MODEL_ID: ${{ vars.VERTEX_AI_EMBEDDING_MODEL_ID }} REDIS_CONNECTION_STRING: ${{ vars.REDIS_CONNECTION_STRING }} run: | - cd python uv run pytest -n logical --dist loadfile --dist worksteal ./tests/integration ./tests/samples -v --junitxml=pytest.xml - name: Surface failing tests if: always() uses: pmeier/pytest-results-action@main with: - # A list of JUnit XML files, directories containing the former, and wildcard - # patterns to process. - # See @actions/glob for supported patterns. path: python/pytest.xml - # (Optional) Add a summary of the results at the top of the report summary: true - # (Optional) Select which results should be included in the report. - # Follows the same syntax as `pytest -r` display-options: fEX - # (Optional) Fail the workflow if no JUnit XML was found. fail-on-empty: true - # (Optional) Title of the test results section in the workflow summary title: Test results - name: Minimize uv cache run: uv cache prune --ci diff --git a/.github/workflows/python-unit-tests.yml b/.github/workflows/python-unit-tests.yml index 85f9131f6ddd..85e7f8090e3e 100644 --- a/.github/workflows/python-unit-tests.yml +++ b/.github/workflows/python-unit-tests.yml @@ -56,18 +56,10 @@ jobs: if: always() uses: pmeier/pytest-results-action@main with: - # A list of JUnit XML files, directories containing the former, and wildcard - # patterns to process. - # See @actions/glob for supported patterns. path: python/pytest.xml - # (Optional) Add a summary of the results at the top of the report summary: true - # (Optional) Select which results should be included in the report. - # Follows the same syntax as `pytest -r` display-options: fEX - # (Optional) Fail the workflow if no JUnit XML was found. fail-on-empty: true - # (Optional) Title of the test results section in the workflow summary title: Test results - name: Minimize uv cache run: uv cache prune --ci