Skip to content

Commit

Permalink
Merge pull request #6 from qodo-ai/dw/new-input
Browse files Browse the repository at this point in the history
add --run-each-test-separately flag
  • Loading branch information
qododavid authored Jan 14, 2025
2 parents de76b53 + a0ea38b commit 8cddb2d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/qodo-cover-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
description: "Desired coverage percentage"
required: false
default: "100"
run_each_test_separately:
description: "Whether the agent should modify the test command to run individual tests"
required: false
default: "true"

runs:
using: "composite"
Expand All @@ -55,6 +59,7 @@ runs:
--model "${{ inputs.model }}" \
--max-iterations "${{ inputs.max_iterations }}" \
--desired-coverage "${{ inputs.desired_coverage }}" \
--run-each-test-separately "${{ inputs.run_each_test_separately }}" \
--action-path "${{ github.action_path }}" \
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/qodo-cover-pr/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ while [[ "$#" -gt 0 ]]; do
--model) MODEL="$2"; shift ;;
--max-iterations) MAX_ITERATIONS="$2"; shift ;;
--desired-coverage) DESIRED_COVERAGE="$2"; shift ;;
--run-each-test-separately) RUN_EACH_TEST_SEPARATELY="$2"; shift ;;
--action-path) ACTION_PATH="$2"; shift ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
Expand Down Expand Up @@ -86,6 +87,7 @@ fi
--model "$MODEL" \
--max-iterations "$MAX_ITERATIONS" \
--desired-coverage "$DESIRED_COVERAGE" \
--run-each-test-separately "$RUN_EACH_TEST_SEPARATELY" \
--report-dir "$REPORT_DIR" \
--modified-files-json "$MODIFIED_FILES_JSON"

Expand Down
5 changes: 5 additions & 0 deletions .github/actions/qodo-cover/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
description: "Desired coverage percentage"
required: false
default: "100"
run_each_test_separately:
description: "Whether the agent should modify the test command to run individual tests"
required: false
default: "true"
branch:
description: "Branch to run on"
required: true
Expand All @@ -57,6 +61,7 @@ runs:
--model "${{ inputs.model }}" \
--max-iterations "${{ inputs.max_iterations }}" \
--desired-coverage "${{ inputs.desired_coverage }}" \
--run-each-test-separately "${{ inputs.run_each_test_separately }}" \
--action-path "${{ github.action_path }}" \
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/qodo-cover/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ while [[ "$#" -gt 0 ]]; do
--model) MODEL="$2"; shift ;;
--max-iterations) MAX_ITERATIONS="$2"; shift ;;
--desired-coverage) DESIRED_COVERAGE="$2"; shift ;;
--run-each-test-separately) RUN_EACH_TEST_SEPARATELY="$2"; shift ;;
--action-path) ACTION_PATH="$2"; shift ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
Expand Down Expand Up @@ -69,6 +70,7 @@ git checkout "$BRANCH"
--model "$MODEL" \
--max-iterations "$MAX_ITERATIONS" \
--desired-coverage "$DESIRED_COVERAGE" \
--run-each-test-separately "$RUN_EACH_TEST_SEPARATELY" \
--report-dir "$REPORT_DIR"

# If new changes
Expand Down

0 comments on commit 8cddb2d

Please sign in to comment.