From f5f98e2be7e63391ba32b11ea9e3d87ef98ba246 Mon Sep 17 00:00:00 2001 From: Saket Aryan Date: Thu, 21 May 2026 19:07:07 +0530 Subject: [PATCH] ci: restore build_embedchain as always-run job with step-level guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Branch protection requires matrix-suffixed contexts (build_embedchain (3.9) … (3.12)). Re-add the embedchain job using the same pattern as build_mem0 so all matrix entries always report a status: the job runs unconditionally and each step is gated on embedchain_changed, exiting cleanly when the directory is untouched and running the full suite otherwise. --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a470bfca9..2b62e09ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,7 @@ jobs: runs-on: ubuntu-latest outputs: mem0_changed: ${{ steps.filter.outputs.mem0 }} + embedchain_changed: ${{ steps.filter.outputs.embedchain }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v2 @@ -60,6 +61,9 @@ jobs: - 'tests/**' - '.github/workflows/ci.yml' - 'pyproject.toml' + embedchain: + - 'embedchain/**' + - '.github/workflows/ci.yml' build_mem0: needs: check_changes @@ -111,3 +115,52 @@ jobs: - name: Run tests and generate coverage report if: needs.check_changes.outputs.mem0_changed == 'true' run: make test + + build_embedchain: + needs: check_changes + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + steps: + - name: Skip — no embedchain changes + if: needs.check_changes.outputs.embedchain_changed != 'true' + run: echo "No changes in embedchain/ — skipping" + - uses: actions/checkout@v4 + if: needs.check_changes.outputs.embedchain_changed == 'true' + - name: Set up Python ${{ matrix.python-version }} + if: needs.check_changes.outputs.embedchain_changed == 'true' + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Hatch + if: needs.check_changes.outputs.embedchain_changed == 'true' + run: pip install hatch + - name: Load cached venv + if: needs.check_changes.outputs.embedchain_changed == 'true' + id: cached-hatch-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-embedchain-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }} + - name: Install dependencies + if: needs.check_changes.outputs.embedchain_changed == 'true' && steps.cached-hatch-dependencies.outputs.cache-hit != 'true' + run: cd embedchain && make install_all + - name: Run Formatting + if: needs.check_changes.outputs.embedchain_changed == 'true' + run: | + mkdir -p embedchain/.ruff_cache && chmod -R 777 embedchain/.ruff_cache + cd embedchain && hatch run format + - name: Lint with ruff + if: needs.check_changes.outputs.embedchain_changed == 'true' + run: cd embedchain && make lint + - name: Run tests and generate coverage report + if: needs.check_changes.outputs.embedchain_changed == 'true' + run: cd embedchain && make coverage + - name: Upload coverage reports to Codecov + if: needs.check_changes.outputs.embedchain_changed == 'true' + uses: codecov/codecov-action@v3 + with: + file: coverage.xml + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}