Skip to content

Commit cbe60a3

Browse files
sentrivanaclaude
andcommitted
fix(ci): Exclude -latest tox envs from CI runs
runtox.sh uses grep to match tox environments, so a search like "py3.14-httpx" would match both the versioned env and the -latest alias, running tests twice. Filter out -latest envs unless explicitly requested. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 21a09d5 commit cbe60a3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/runtox.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ fi
1515

1616
searchstring="$1"
1717

18-
ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')"
18+
# Filter out -latest environments unless explicitly requested
19+
if [[ "$searchstring" == *-latest* ]]; then
20+
ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')"
21+
else
22+
ENV="$($TOXPATH -l | grep -- "$searchstring" | grep -v -- '-latest$' | tr $'\n' ',')"
23+
fi
1924

2025
if [ -z "${ENV}" ]; then
2126
echo "No targets found. Skipping."

0 commit comments

Comments
 (0)