From af6a8fd2cfe06dd8c40d27b25d64168e9910fe56 Mon Sep 17 00:00:00 2001 From: Ammar Date: Sat, 25 Oct 2025 18:17:01 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Add=20workflow=5Fdispatch=20?= =?UTF-8?q?test=5Ffilter=20to=20CI=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _Generated with `cmux`_ Allow manual CI workflow triggers to specify an optional test_filter input that gets passed to both unit and integration test jobs. This enables running specific tests via GitHub Actions UI without requiring a full CI run. The filter works with both bun test and jest since they share compatible syntax for file path patterns (positional args) and test name patterns (-t flag). --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 978b6813fe..9578e3f0b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,11 @@ on: branches: ["**"] merge_group: workflow_dispatch: + inputs: + test_filter: + description: 'Optional test filter (e.g., "workspace", "tests/file.test.ts", or "-t pattern")' + required: false + type: string jobs: static-check: @@ -68,7 +73,7 @@ jobs: - uses: ./.github/actions/setup-cmux - name: Run tests with coverage - run: bun test --coverage --coverage-reporter=lcov src + run: bun test --coverage --coverage-reporter=lcov ${{ inputs.test_filter || 'src' }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 @@ -90,7 +95,7 @@ jobs: - uses: ./.github/actions/setup-cmux - name: Run integration tests with coverage - run: TEST_INTEGRATION=1 bun x jest --coverage tests + run: TEST_INTEGRATION=1 bun x jest --coverage ${{ inputs.test_filter || 'tests' }} env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From 9b68082264050ee13da700a66f21b563450c2c37 Mon Sep 17 00:00:00 2001 From: Ammar Date: Sat, 25 Oct 2025 18:19:53 -0500 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20Fix=20test=5Ffilter=20for=20?= =?UTF-8?q?non-dispatch=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use github.event.inputs.test_filter instead of inputs.test_filter to avoid undefined context errors on pull_request and merge_group events. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9578e3f0b7..7af4740092 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: - uses: ./.github/actions/setup-cmux - name: Run tests with coverage - run: bun test --coverage --coverage-reporter=lcov ${{ inputs.test_filter || 'src' }} + run: bun test --coverage --coverage-reporter=lcov ${{ github.event.inputs.test_filter || 'src' }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 @@ -95,7 +95,7 @@ jobs: - uses: ./.github/actions/setup-cmux - name: Run integration tests with coverage - run: TEST_INTEGRATION=1 bun x jest --coverage ${{ inputs.test_filter || 'tests' }} + run: TEST_INTEGRATION=1 bun x jest --coverage ${{ github.event.inputs.test_filter || 'tests' }} env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}