7171 ref : main
7272 path : trusted-scripts
7373
74- # Checkout actual PR code to test
74+ # Checkout actual PR code to test (to different path to avoid overwriting trusted-scripts)
7575 - uses : actions/checkout@v4
76+ with :
77+ path : pr-code
7678
7779 - uses : actions/setup-node@v4
7880 if : matrix.provider == 'copilot'
@@ -100,10 +102,11 @@ jobs:
100102 COPILOT_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101103 OLLAMA_API_KEY : ${{ secrets.OLLAMA_API_KEY }}
102104 TRULENS_OTEL_ENDPOINT : ${{ secrets.TRULENS_OTEL_ENDPOINT }}
105+ working-directory : pr-code
103106 run : |
104107 # Construct arguments array for safety
105108 ARGS=(--provider "${{ matrix.provider }}" --model "${{ matrix.model }}" --judge --verbose --report --threshold 50)
106-
109+
107110 if [ -n "${{ matrix.extra_args }}" ]; then
108111 # Split extra_args safely if needed, but for now assuming simple flags
109112 ARGS+=(${{ matrix.extra_args }})
@@ -116,15 +119,16 @@ jobs:
116119 fi
117120
118121 echo "Running evaluation..."
119- # Use trusted script with correct project path
120- uv run --project . --frozen trusted-scripts/tests/evaluator.py "${ARGS[@]}"
122+ # Run evaluator from trusted-scripts/tests
123+ # The working-directory is pr-code, so evaluator.py finds PR code at current directory
124+ uv run --project . --frozen ../trusted-scripts/tests/evaluator.py "${ARGS[@]}"
121125
122126 - name : Upload results
123127 if : always()
124128 uses : actions/upload-artifact@v4
125129 with :
126130 name : ${{ steps.artifact.outputs.name }}
127- path : tests/results/
131+ path : pr-code/ tests/results/
128132 retention-days : 1
129133
130134 consolidate :
@@ -141,14 +145,14 @@ jobs:
141145
142146 - uses : actions/download-artifact@v4
143147 with :
144- path : tests/results/
148+ path : pr-code/ tests/results/
145149
146150 - name : Consolidate results
147- run : python3 trusted-scripts/ci/consolidate_results.py
151+ run : python3 trusted-scripts/ci/consolidate_results.py --results-dir pr-code/tests/results --output-file pr-code/comment.md
148152
149153 - name : Post to PR
150154 uses : marocchino/sticky-pull-request-comment@v2
151- if : hashFiles('comment.md') != ''
155+ if : hashFiles('pr-code/ comment.md') != ''
152156 with :
153157 number : ${{ github.event.issue.number }}
154- path : comment.md
158+ path : pr-code/ comment.md
0 commit comments