From ebdc2015b646f1a0f38262a52f4f90fac0effaee Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 8 Oct 2025 18:10:53 -0300 Subject: [PATCH] chore: Enhance CI workflow to include Docker testing (#10104) * chore: Update changes-filter.yaml to include docker paths Added docker-related paths to the changes filter configuration, ensuring that changes in the docker directory, uv.lock, pyproject.toml, and backend source files are tracked appropriately. * chore: Update docker_test workflow trigger to use workflow_call Modified the GitHub Actions workflow for testing Docker images to trigger on workflow_call instead of push events, streamlining the CI process for Docker-related changes. * chore: Enhance CI workflow to include Docker testing Added a new job for testing Docker images in the CI workflow, ensuring that Docker-related changes are validated. Updated conditions to include Docker outputs in the path filter and CI success summary. * chore: Update changes-filter.yaml to include frontend paths Added frontend source paths and .dockerignore to the changes filter configuration, ensuring that changes in the frontend directory are tracked alongside existing Docker-related paths. --- .github/changes-filter.yaml | 8 ++++++++ .github/workflows/ci.yml | 13 ++++++++++++- .github/workflows/docker_test.yml | 9 +-------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/changes-filter.yaml b/.github/changes-filter.yaml index 02a639abdc..490e4cbc50 100644 --- a/.github/changes-filter.yaml +++ b/.github/changes-filter.yaml @@ -21,6 +21,14 @@ frontend: - ".github/workflows/ci.yml" docs: - "docs/**" +docker: + - "docker/**" + - "uv.lock" + - "pyproject.toml" + - "src/backend/**" + - "src/frontend/**" + - ".dockerignore" + - ".github/workflows/docker_test.yml" # Test categories and their associated paths starter-projects: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6b63ebd3c..e372dc689b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,6 +185,7 @@ jobs: workspace: ${{ steps.filter.outputs.workspace }} api: ${{ steps.filter.outputs.api }} database: ${{ steps.filter.outputs.database }} + docker: ${{ steps.filter.outputs.docker }} docs-only: ${{ steps.filter.outputs.docs == 'true' && steps.filter.outputs.python != 'true' && @@ -196,7 +197,8 @@ jobs: steps.filter.outputs.components != 'true' && steps.filter.outputs.workspace != 'true' && steps.filter.outputs.api != 'true' && - steps.filter.outputs.database != 'true' + steps.filter.outputs.database != 'true' && + steps.filter.outputs.docker != 'true' }} steps: @@ -331,6 +333,12 @@ jobs: run: | uv run pytest src/backend/tests/unit/template/test_starter_projects.py -v -n auto + test-docker: + needs: [path-filter, set-ci-condition] + name: Test Docker Images + if: ${{ needs.path-filter.outputs.docker == 'true' && needs.set-ci-condition.outputs.should-run-tests == 'true' }} + uses: ./.github/workflows/docker_test.yml + # https://github.com/langchain-ai/langchain/blob/master/.github/workflows/check_diffs.yml ci_success: name: "CI Success" @@ -342,6 +350,7 @@ jobs: lint-backend, test-docs-build, test-templates, + test-docker, set-ci-condition, path-filter, check-nightly-status, @@ -395,6 +404,8 @@ jobs: " - Documentation Build: Check documentation syntax and build process" elif $job == "test-templates" then " - Template Tests: Check starter project templates" + elif $job == "test-docker" then + " - Docker Tests: Check Docker image builds and version verification" elif $job == "path-filter" then " - Path Filter: File path filtering failed" elif $job == "set-ci-condition" then diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 2e158b93ed..9505cd8a09 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -1,14 +1,7 @@ name: Test Docker images on: - push: - branches: [main] - paths: - - "docker/**" - - "uv.lock" - - "pyproject.toml" - - "src/backend/**" - - ".github/workflows/docker_test.yml" + workflow_call: workflow_dispatch: env: