Skip to content

Commit e9c9bcc

Browse files
Copilotlionello
andcommitted
Fix test runner to prevent running too many tests by anchoring sample name patterns
Co-authored-by: lionello <591860+lionello@users.noreply.github.com>
1 parent a1834b2 commit e9c9bcc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/deploy-changed-samples.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ jobs:
103103
TEST_SHARED_SECRETS: ${{ secrets.TEST_SHARED_SECRETS}}
104104
TEST_ALLOWED_HOSTS: ${{ secrets.TEST_ALLOWED_HOSTS }}
105105
run: |
106-
SAMPLES=$(sed 's|^samples/||' changed_samples.txt | paste -s -d ',' -)
106+
# Escape regex special characters and anchor patterns to ensure exact matching of sample names
107+
SAMPLES=$(sed 's|^samples/||' changed_samples.txt | awk '{gsub(/[.*+?^${}()|[\]\\]/, "\\\\&"); print "^" $0 "$"}' | paste -s -d ',' -)
107108
echo "Running tests for samples: $SAMPLES"
108109
mkdir output
109110
# concurrency is set to 10 to avoid exhausting our fargate vCPU limits when running

0 commit comments

Comments
 (0)