OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
fix: changed workflows to build images for both tests at the same time (#1962)
Lucas Oliveiraad36f607d452
diff --git a/.github/changes-filter.yaml b/.github/changes-filter.yamlindex a4a7daea5..e7d27fdcd 100644--- a/.github/changes-filter.yaml+++ b/.github/changes-filter.yaml@@ -3,7 +3,7 @@ python:- "src/**"- "pyproject.toml"- "uv.lock"- - "**/test-integration.yml"+ - "**/test-ci.yml"frontend:- "frontend/**"diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.ymlnew file mode 100644index 000000000..fd67e465e--- /dev/null+++ b/.github/workflows/test-ci.yml@@ -0,0 +1,378 @@+name: CI Tests++on:+ pull_request:+ workflow_dispatch:+ inputs:+ use_local_images:+ description: 'Build images locally instead of pulling from DockerHub'+ required: false+ type: boolean+ default: true++env:+ NODE_VERSION: "22"+ PYTHON_VERSION: "3.13"+ PLAYWRIGHT_BROWSERS_PATH: "ms-playwright"+ PLAYWRIGHT_VERSION: "1.57.0"+ OPENSEARCH_PASSWORD: ${{ vars.OPENSEARCH_PASSWORD || secrets.OPENSEARCH_PASSWORD || 'OpenRag#2025!' }}+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}+ LANGFLOW_AUTO_LOGIN: "True"+ LANGFLOW_NEW_USER_IS_ACTIVE: "True"+ LANGFLOW_ENABLE_SUPERUSER_CLI: "True"+ LANGFLOW_CHAT_FLOW_ID: ${{ vars.LANGFLOW_CHAT_FLOW_ID || '1098eea1-6649-4e1d-aed1-b77249fb8dd0' }}+ LANGFLOW_INGEST_FLOW_ID: ${{ vars.LANGFLOW_INGEST_FLOW_ID || '5488df7c-b93f-4f87-a446-b67028bc0813' }}+ NUDGES_FLOW_ID: ${{ vars.NUDGES_FLOW_ID || 'ebc01d31-1976-46ce-a385-b0240327226c' }}+ CI_IMAGE_TAG: ci-${{ github.sha }}+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}+ WATSONX_API_KEY: ${{ secrets.WATSONX_API_KEY }}+ WATSONX_ENDPOINT: ${{ secrets.WATSONX_ENDPOINT }}+ WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}+ OLLAMA_ENDPOINT: ${{ secrets.OLLAMA_ENDPOINT }}+ GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}+ GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}+ LANGFLOW_URL_INGEST_FLOW_ID: ${{ vars.LANGFLOW_URL_INGEST_FLOW_ID || '72c3d17c-2dac-4a73-b48a-6518473d7830' }}+ # Single-node test cluster never reaches the multi-node readiness counts+ OPENSEARCH_NODE_COUNT_CHECK: "false"++jobs:+ changes:+ runs-on: ubuntu-latest+ outputs:+ e2e: ${{ steps.filter.outputs.e2e }}+ integration: ${{ steps.filter.outputs.integration }}+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Detect changes+ uses: dorny/paths-filter@v3+ id: filter+ with:+ filters: |+ e2e:+ - 'src/**'+ - 'frontend/**'+ - 'tests/**'+ - 'scripts/**'+ - 'flows/**'+ - 'docker-compose.yml'+ - 'Dockerfile*'+ - 'Makefile'+ - '.github/workflows/test-ci.yml'+ integration:+ - 'src/**.py'+ - 'tests/**.py'+ - 'pyproject.toml'+ - 'uv.lock'+ - 'sdks/**'+ - 'flows/**'+ - 'Makefile'+ - 'scripts/**'+ - '.github/workflows/test-ci.yml'++ build-images:+ needs: changes+ if: ${{ needs.changes.outputs.e2e == 'true' || needs.changes.outputs.integration == 'true' || github.event_name == 'workflow_dispatch' }}+ runs-on:+ labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]+ steps:+ - run: df -h++ - name: Cleanup Docker cache+ run: |+ docker system prune -af || true+ docker builder prune -af || true+ docker compose -f docker-compose.yml down -v --remove-orphans || true++ - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)+ run: |+ for i in 1 2 3; do+ docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break+ echo "Attempt $i failed, retrying in 5s..."+ sleep 5+ done || true++ - run: df -h++ - name: Checkout+ uses: actions/checkout@v4++ - name: Verify workspace+ run: |+ echo "Current directory: $(pwd)"+ echo "Workspace: ${GITHUB_WORKSPACE}"+ ls -la++ - name: Build OpenRAG images+ run: |+ USE_LOCAL="${{ inputs.use_local_images }}"+ for i in 1 2 3; do+ echo "Build attempt $i..."+ if [ "${{ github.event_name }}" == "pull_request" ] || [ "$USE_LOCAL" != "false" ]; then+ echo "Building PR images locally..."+ if OPENRAG_VERSION="${CI_IMAGE_TAG}" make ci-build-images; then+ break+ fi+ else+ echo "Preparing DockerHub images..."+ if docker pull langflowai/openrag-backend:latest && \+ docker pull langflowai/openrag-frontend:latest && \+ docker pull langflowai/openrag-langflow:latest && \+ docker tag langflowai/openrag-backend:latest "langflowai/openrag-backend:${CI_IMAGE_TAG}" && \+ docker tag langflowai/openrag-frontend:latest "langflowai/openrag-frontend:${CI_IMAGE_TAG}" && \+ docker tag langflowai/openrag-langflow:latest "langflowai/openrag-langflow:${CI_IMAGE_TAG}" && \+ docker build --no-cache -t "langflowai/openrag-opensearch:${CI_IMAGE_TAG}" -f Dockerfile .; then+ break+ fi+ fi+ echo "Build attempt $i failed. Retrying in 10 seconds..."+ sleep 10+ if [ $i -eq 3 ]; then+ echo "Build failed after 3 attempts."+ exit 1+ fi+ done++ - name: Save OpenRAG images+ run: OPENRAG_VERSION="${CI_IMAGE_TAG}" make ci-save-images++ - name: Upload OpenRAG image artifact+ uses: actions/upload-artifact@v4+ with:+ name: openrag-ci-images-${{ github.sha }}+ path: .ci-artifacts/openrag-ci-images.tar+ retention-days: 1+ compression-level: 0++ test-suite:+ needs: [changes, build-images]+ if: ${{ needs.changes.outputs.integration == 'true' || github.event_name == 'workflow_dispatch' }}+ runs-on:+ labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]+ strategy:+ fail-fast: false+ matrix:+ suite: [core, sdk-python, sdk-typescript]+ name: tests (${{ matrix.suite }})+ steps:+ - run: df -h++ - name: Cleanup Docker cache+ run: |+ docker system prune -af || true+ docker builder prune -af || true+ docker compose -f docker-compose.yml down -v --remove-orphans || true++ - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)+ run: |+ for i in 1 2 3; do+ docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break+ echo "Attempt $i failed, retrying in 5s..."+ sleep 5+ done || true++ - run: df -h++ - name: Checkout+ uses: actions/checkout@v4++ - name: Verify workspace+ run: |+ echo "Current directory: $(pwd)"+ echo "Workspace: ${GITHUB_WORKSPACE}"+ ls -la++ - name: Set up UV+ uses: astral-sh/setup-uv@v3+ with:+ version: latest++ - name: Set up Node.js+ if: matrix.suite == 'sdk-typescript'+ uses: actions/setup-node@v4+ with:+ node-version: '20'++ - name: Python version+ run: uv python install 3.13++ - name: Download OpenRAG image artifact+ uses: actions/download-artifact@v4+ with:+ name: openrag-ci-images-${{ github.sha }}+ path: .ci-artifacts++ - name: Load OpenRAG images+ run: docker load -i .ci-artifacts/openrag-ci-images.tar++ - name: Run ${{ matrix.suite }} integration suite+ env:+ OPENSEARCH_HOST: localhost+ OPENSEARCH_PORT: 9200+ OPENSEARCH_USERNAME: admin+ OPENSEARCH_PASSWORD: ${{ env.OPENSEARCH_PASSWORD }}+ LOG_LEVEL: DEBUG+ # Force no-auth mode so tests bypass OAuth+ GOOGLE_OAUTH_CLIENT_ID: ""+ GOOGLE_OAUTH_CLIENT_SECRET: ""+ # Disable startup ingest noise unless a test enables it+ DISABLE_STARTUP_INGEST: "true"+ run: |+ OPENRAG_VERSION="${CI_IMAGE_TAG}" TEST_SUITE="${{ matrix.suite }}" make test-ci-suite+ echo "Keys directory after tests:"+ ls -la keys/ || echo "No keys directory"++ e2e-run:+ needs: [changes, build-images]+ if: ${{ needs.changes.outputs.e2e == 'true' || github.event_name == 'workflow_dispatch' }}+ runs-on:+ labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]+ steps:+ - name: Cleanup Docker cache+ run: |+ docker system prune -af || true+ docker builder prune -af || true+ docker compose -f docker-compose.yml down -v --remove-orphans || true++ - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)+ run: |+ for i in 1 2 3; do+ docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break+ echo "Attempt $i failed, retrying in 5s..."+ sleep 5+ done || true++ - name: Checkout+ uses: actions/checkout@v4++ - name: Set up UV+ uses: astral-sh/setup-uv@v3+ with:+ version: latest++ - name: Set up Node.js+ uses: actions/setup-node@v4+ with:+ node-version: ${{ env.NODE_VERSION }}++ - name: Install Python+ run: uv python install 3.13++ - name: Install frontend dependencies+ working-directory: frontend+ run: npm ci++ - name: Install Playwright Browsers+ working-directory: frontend+ run: |+ npx playwright install --with-deps chromium++ - name: Download OpenRAG image artifact+ uses: actions/download-artifact@v4+ with:+ name: openrag-ci-images-${{ github.sha }}+ path: .ci-artifacts++ - name: Load OpenRAG images+ run: docker load -i .ci-artifacts/openrag-ci-images.tar++ - name: Setup E2E infrastructure+ run: |+ chmod +x scripts/setup-e2e.sh+ OPENRAG_VERSION="${CI_IMAGE_TAG}" ./scripts/setup-e2e.sh++ - name: Run Playwright tests+ working-directory: frontend+ env:+ CI: "true"+ OPENSEARCH_HOST: localhost+ OPENSEARCH_PORT: "9200"+ OPENSEARCH_USERNAME: admin+ OPENSEARCH_PASSWORD: ${{ env.OPENSEARCH_PASSWORD }}+ GOOGLE_OAUTH_CLIENT_ID: ""+ GOOGLE_OAUTH_CLIENT_SECRET: ""+ run: npx playwright test++ - name: Collect service logs on failure+ if: failure()+ run: |+ mkdir -p service-logs+ docker logs os > service-logs/opensearch.log 2>&1 || true+ docker logs openrag-backend > service-logs/backend.log 2>&1 || true+ docker logs langflow > service-logs/langflow.log 2>&1 || true+ docker logs openrag-backend-proxy > service-logs/backend-proxy.log 2>&1 || true++ - name: Upload service logs+ uses: actions/upload-artifact@v4+ if: failure()+ with:+ name: service-logs+ path: service-logs/+ retention-days: 7++ - name: Upload Playwright report+ uses: actions/upload-artifact@v4+ if: ${{ !cancelled() }}+ with:+ name: playwright-report+ path: frontend/playwright-report/+ retention-days: 14++ - name: Upload test results+ uses: actions/upload-artifact@v4+ if: ${{ !cancelled() }}+ with:+ name: playwright-test-results+ path: frontend/test-results/+ retention-days: 7++ - name: Teardown infrastructure+ if: always()+ run: |+ make docling-stop || true+ docker rm -f openrag-backend-proxy 2>/dev/null || true+ make clean || true+ docker system prune -f || true++ tests:+ needs: [changes, build-images, test-suite]+ if: always()+ runs-on:+ labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]+ steps:+ - name: Check split integration result+ run: |+ if [ "${{ needs.changes.outputs.integration }}" = "true" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ if [ "${{ needs.build-images.result }}" != "success" ]; then+ echo "build-images failed"+ exit 1+ fi+ if [ "${{ needs.test-suite.result }}" != "success" ]; then+ echo "one or more integration suites failed"+ exit 1+ fi+ fi+ echo "all integration suites passed or skipped"++ e2e:+ needs: [changes, build-images, e2e-run]+ if: always()+ runs-on:+ labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]+ steps:+ - name: Check E2E result+ run: |+ if [ "${{ needs.changes.outputs.e2e }}" = "true" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then+ if [ "${{ needs.build-images.result }}" != "success" ]; then+ echo "build-images failed"+ exit 1+ fi+ if [ "${{ needs.e2e-run.result }}" != "success" ]; then+ echo "E2E tests failed"+ exit 1+ fi+ fi+ echo "E2E tests passed or skipped"diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.ymldeleted file mode 100644index 84dcb8c73..000000000--- a/.github/workflows/test-e2e.yml+++ /dev/null@@ -1,179 +0,0 @@-name: E2E Tests--# NOTE: This workflow intentionally has no top-level `paths` filter so it always-# triggers on pull_request. The required status check "E2E Tests / e2e" must be-# reported for every PR (including kubernetes-only PRs targeting release branches).-# The expensive Playwright job is gated below on the `changes` job: when no-# application paths changed, `e2e` is skipped, which branch protection treats as a-# successful required check. Operator/helm changes are validated by operator-ci.yml.-on:- pull_request:- workflow_dispatch:--env:- NODE_VERSION: "22"- PYTHON_VERSION: "3.13"- # Define the directory where Playwright browsers will be installed.- # This path is used for caching across workflows- PLAYWRIGHT_BROWSERS_PATH: "ms-playwright"- PLAYWRIGHT_VERSION: "1.57.0"--jobs:- changes:- runs-on: ubuntu-latest- outputs:- app: ${{ steps.filter.outputs.app }}- steps:- - name: Checkout- uses: actions/checkout@v4-- - name: Detect application changes- uses: dorny/paths-filter@v3- id: filter- with:- filters: |- app:- - 'src/**'- - 'frontend/**'- - 'tests/**'- - 'scripts/**'- - 'flows/**'- - 'docker-compose.yml'- - 'Dockerfile*'- - 'Makefile'- - '.github/workflows/test-e2e.yml'-- e2e:- needs: changes- # Run the full suite when application paths changed, or when triggered- # manually via workflow_dispatch. Otherwise the job is skipped, which- # branch protection treats as a successful required check.- if: ${{ needs.changes.outputs.app == 'true' || github.event_name == 'workflow_dispatch' }}- runs-on:- labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]- env:- LANGFLOW_AUTO_LOGIN: "True"- LANGFLOW_NEW_USER_IS_ACTIVE: "True"- LANGFLOW_ENABLE_SUPERUSER_CLI: "True"- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}- WATSONX_API_KEY: ${{ secrets.WATSONX_API_KEY }}- WATSONX_ENDPOINT: ${{ secrets.WATSONX_ENDPOINT }}- WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}- OLLAMA_ENDPOINT: ${{ secrets.OLLAMA_ENDPOINT }}- GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}- GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}- OPENSEARCH_PASSWORD: ${{ vars.OPENSEARCH_PASSWORD || secrets.OPENSEARCH_PASSWORD || 'OpenRag#2025!' }}- # Single-node E2E cluster never reaches the multi-node readiness counts- OPENSEARCH_NODE_COUNT_CHECK: "false"- LANGFLOW_CHAT_FLOW_ID: ${{ vars.LANGFLOW_CHAT_FLOW_ID || '1098eea1-6649-4e1d-aed1-b77249fb8dd0' }}- LANGFLOW_INGEST_FLOW_ID: ${{ vars.LANGFLOW_INGEST_FLOW_ID || '5488df7c-b93f-4f87-a446-b67028bc0813' }}- LANGFLOW_URL_INGEST_FLOW_ID: ${{ vars.LANGFLOW_URL_INGEST_FLOW_ID || '72c3d17c-2dac-4a73-b48a-6518473d7830' }}- NUDGES_FLOW_ID: ${{ vars.NUDGES_FLOW_ID || 'ebc01d31-1976-46ce-a385-b0240327226c' }}-- steps:- - name: Cleanup Docker cache- run: |- docker system prune -af || true- docker builder prune -af || true- docker compose -f docker-compose.yml down -v --remove-orphans || true-- - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)- run: |- for i in 1 2 3; do- docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break- echo "Attempt $i failed, retrying in 5s..."- sleep 5- done || true-- - name: Checkout- uses: actions/checkout@v4-- - name: Set up UV- uses: astral-sh/setup-uv@v3- with:- version: latest-- - name: Set up Node.js- uses: actions/setup-node@v4- with:- node-version: ${{ env.NODE_VERSION }}-- - name: Install Python- run: uv python install 3.13--- - name: Install frontend dependencies- working-directory: frontend- run: npm ci-- - name: Install Playwright Browsers- working-directory: frontend- run: |- npx playwright install --with-deps chromium-- - name: Build Docker images- run: |- make build- docker builder prune -af-- - name: Setup E2E infrastructure- run: |- chmod +x scripts/setup-e2e.sh- ./scripts/setup-e2e.sh--- - name: Run Playwright tests- working-directory: frontend- env:- CI: "true"- OPENSEARCH_HOST: localhost- OPENSEARCH_PORT: "9200"- OPENSEARCH_USERNAME: admin- OPENSEARCH_PASSWORD: ${{ env.OPENSEARCH_PASSWORD }}- GOOGLE_OAUTH_CLIENT_ID: ""- GOOGLE_OAUTH_CLIENT_SECRET: ""- run: npx playwright test-- - name: Collect service logs on failure- if: failure()- run: |- mkdir -p service-logs- docker logs os > service-logs/opensearch.log 2>&1 || true- docker logs openrag-backend > service-logs/backend.log 2>&1 || true- docker logs langflow > service-logs/langflow.log 2>&1 || true- docker logs openrag-backend-proxy > service-logs/backend-proxy.log 2>&1 || true-- - name: Upload service logs- uses: actions/upload-artifact@v4- if: failure()- with:- name: service-logs- path: service-logs/- retention-days: 7-- - name: Upload Playwright report- uses: actions/upload-artifact@v4- if: ${{ !cancelled() }}- with:- name: playwright-report- path: frontend/playwright-report/- retention-days: 14-- - name: Upload test results- uses: actions/upload-artifact@v4- if: ${{ !cancelled() }}- with:- name: playwright-test-results- path: frontend/test-results/- retention-days: 7-- - name: Teardown infrastructure- if: always()- run: |- make docling-stop || true- docker rm -f openrag-backend-proxy 2>/dev/null || true- make clean || true- docker system prune -f || truediff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.ymldeleted file mode 100644index a42eee86c..000000000--- a/.github/workflows/test-integration.yml+++ /dev/null@@ -1,190 +0,0 @@-name: Integration Tests--on:- pull_request:- paths:- - 'src/**.py'- - 'tests/**.py'- - 'pyproject.toml'- - 'uv.lock'- - 'sdks/**'- - 'flows/**'- - 'Makefile'- - 'scripts/**'- - '.github/workflows/test-integration.yml'- workflow_dispatch:- inputs:- use_local_images:- description: 'Build images locally instead of pulling from DockerHub'- required: false- type: boolean- default: true--env:- # Prefer repository/environment variable first, then secret, then a sane fallback- OPENSEARCH_PASSWORD: ${{ vars.OPENSEARCH_PASSWORD || secrets.OPENSEARCH_PASSWORD || 'OpenRag#2025!' }}- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}- LANGFLOW_AUTO_LOGIN: "True"- LANGFLOW_NEW_USER_IS_ACTIVE: "True"- LANGFLOW_ENABLE_SUPERUSER_CLI: "True"- LANGFLOW_CHAT_FLOW_ID: ${{ vars.LANGFLOW_CHAT_FLOW_ID || '1098eea1-6649-4e1d-aed1-b77249fb8dd0' }}- LANGFLOW_INGEST_FLOW_ID: ${{ vars.LANGFLOW_INGEST_FLOW_ID || '5488df7c-b93f-4f87-a446-b67028bc0813' }}- NUDGES_FLOW_ID: ${{ vars.NUDGES_FLOW_ID || 'ebc01d31-1976-46ce-a385-b0240327226c' }}- CI_IMAGE_TAG: ci-${{ github.sha }}--jobs:- build-images:- runs-on:- labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]- steps:- - run: df -h-- - name: Cleanup Docker cache- run: |- docker system prune -af || true- docker builder prune -af || true- docker compose -f docker-compose.yml down -v --remove-orphans || true-- - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)- run: |- for i in 1 2 3; do- docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break- echo "Attempt $i failed, retrying in 5s..."- sleep 5- done || true-- - run: df -h-- - name: Checkout- uses: actions/checkout@v4-- - name: Verify workspace- run: |- echo "Current directory: $(pwd)"- echo "Workspace: ${GITHUB_WORKSPACE}"- ls -la-- - name: Build OpenRAG images- run: |- USE_LOCAL="${{ inputs.use_local_images }}"- if [ "${{ github.event_name }}" == "pull_request" ] || [ "$USE_LOCAL" != "false" ]; then- echo "Building PR images locally..."- OPENRAG_VERSION="${CI_IMAGE_TAG}" make ci-build-images- else- echo "Preparing DockerHub images..."- docker pull langflowai/openrag-backend:latest- docker pull langflowai/openrag-frontend:latest- docker pull langflowai/openrag-langflow:latest- docker tag langflowai/openrag-backend:latest "langflowai/openrag-backend:${CI_IMAGE_TAG}"- docker tag langflowai/openrag-frontend:latest "langflowai/openrag-frontend:${CI_IMAGE_TAG}"- docker tag langflowai/openrag-langflow:latest "langflowai/openrag-langflow:${CI_IMAGE_TAG}"- docker build --no-cache -t "langflowai/openrag-opensearch:${CI_IMAGE_TAG}" -f Dockerfile .- fi-- - name: Save OpenRAG images- run: OPENRAG_VERSION="${CI_IMAGE_TAG}" make ci-save-images-- - name: Upload OpenRAG image artifact- uses: actions/upload-artifact@v4- with:- name: openrag-ci-images-${{ github.sha }}- path: .ci-artifacts/openrag-ci-images.tar- retention-days: 1- compression-level: 0-- test-suite:- needs: build-images- runs-on:- labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]- strategy:- fail-fast: false- matrix:- suite: [core, sdk-python, sdk-typescript]- name: tests (${{ matrix.suite }})- steps:- - run: df -h-- - name: Cleanup Docker cache- run: |- docker system prune -af || true- docker builder prune -af || true- docker compose -f docker-compose.yml down -v --remove-orphans || true-- - name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)- run: |- for i in 1 2 3; do- docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config /work/langflow-data /work/keys /work/data /work/flows /work/openrag-documents" && break- echo "Attempt $i failed, retrying in 5s..."- sleep 5- done || true-- - run: df -h-- - name: Checkout- uses: actions/checkout@v4-- - name: Verify workspace- run: |- echo "Current directory: $(pwd)"- echo "Workspace: ${GITHUB_WORKSPACE}"- ls -la-- - name: Set up UV- uses: astral-sh/setup-uv@v3- with:- version: latest-- - name: Set up Node.js- if: matrix.suite == 'sdk-typescript'- uses: actions/setup-node@v4- with:- node-version: '20'-- - name: Python version- run: uv python install 3.13-- - name: Download OpenRAG image artifact- uses: actions/download-artifact@v4- with:- name: openrag-ci-images-${{ github.sha }}- path: .ci-artifacts-- - name: Load OpenRAG images- run: docker load -i .ci-artifacts/openrag-ci-images.tar-- - name: Run ${{ matrix.suite }} integration suite- env:- OPENSEARCH_HOST: localhost- OPENSEARCH_PORT: 9200- OPENSEARCH_USERNAME: admin- OPENSEARCH_PASSWORD: ${{ env.OPENSEARCH_PASSWORD }}- LOG_LEVEL: DEBUG- # Force no-auth mode so tests bypass OAuth- GOOGLE_OAUTH_CLIENT_ID: ""- GOOGLE_OAUTH_CLIENT_SECRET: ""- # Disable startup ingest noise unless a test enables it- DISABLE_STARTUP_INGEST: "true"- # Single-node test cluster never reaches the multi-node readiness counts- OPENSEARCH_NODE_COUNT_CHECK: "false"- run: |- OPENRAG_VERSION="${CI_IMAGE_TAG}" TEST_SUITE="${{ matrix.suite }}" make test-ci-suite- echo "Keys directory after tests:"- ls -la keys/ || echo "No keys directory"-- tests:- needs: [build-images, test-suite]- if: always()- runs-on:- labels: ["self-hosted", "linux", "ARM64", "langflow-ai-arm64-40gb-ephemeral-sudo"]- steps:- - name: Check split integration result- run: |- if [ "${{ needs.build-images.result }}" != "success" ]; then- echo "build-images failed"- exit 1- fi- if [ "${{ needs.test-suite.result }}" != "success" ]; then- echo "one or more integration suites failed"- exit 1- fi- echo "all integration suites passed"