From df79f7ef220550f1001a6c110b56ad416d858cd8 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Wed, 26 Nov 2025 17:21:28 -0800 Subject: [PATCH] Feat: Add workflow to run specific test number --- .github/workflows/run-single-test.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/run-single-test.yml diff --git a/.github/workflows/run-single-test.yml b/.github/workflows/run-single-test.yml new file mode 100644 index 0000000..83288be --- /dev/null +++ b/.github/workflows/run-single-test.yml @@ -0,0 +1,38 @@ +name: Run Single Test Benchmark + +on: + workflow_dispatch: + inputs: + test_number: + description: 'Test number to run (e.g. 4)' + required: true + type: string + +jobs: + benchmark: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Run benchmark for single test + run: npm start -- --test "${{ inputs.test_number }}" + env: + OPENROUTER_KEY: ${{ secrets.OPENROUTER_KEY }} + + - name: Commit and push if changed + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add README tests results.json + git diff --staged --quiet || (git commit -m "Docs: Update benchmark for test ${{ inputs.test_number }}" && git push)