Skip to content

Commit 702d6f6

Browse files
committed
ci: the profiles line now leads with the PHP version
Two steps asserted COMPOSE_PROFILES exactly and were written before versions lived on that line. The first install of a scripted run also accepts the mail catcher, so the light-install check compares what is there rather than the whole line. Both were run verbatim from a clean copy this time -- the gap that let them through was checking only the steps the running stack could reach.
1 parent 7f0a717 commit 702d6f6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ jobs:
8686
# reproduce the bug: --profiles bypassed validation entirely, so this
8787
# passed even while every typed name was being rejected.
8888
./install.sh --yes --skip-dns --skip-cert --skip-link --profiles=pg18,mail >/dev/null
89-
grep -q '^COMPOSE_PROFILES=pg18,mail$' .env
89+
# The default PHP version leads the line: versions are profiles too.
90+
grep -q '^COMPOSE_PROFILES=php84,pg18,mail$' .env
9091
rm -f .env .env.backup
9192
9293
# a name that does not must stop a scripted install, not write a dead profile
@@ -145,7 +146,13 @@ jobs:
145146
# each. What is not picked must not reach the default set at all.
146147
- name: only the PHP versions you picked are installed
147148
run: |
148-
grep -q '^COMPOSE_PROFILES=php84$' .env
149+
# Not an exact match on the line: --yes also accepts the mail catcher.
150+
grep -qE '^COMPOSE_PROFILES=php84(,|$)' .env \
151+
|| { grep '^COMPOSE_PROFILES=' .env; exit 1; }
152+
if grep '^COMPOSE_PROFILES=' .env | grep -qE 'php(83|85)'; then
153+
echo "a version nobody asked for was enabled"
154+
grep '^COMPOSE_PROFILES=' .env; exit 1
155+
fi
149156
for s in php83dev php85dev; do
150157
if docker compose config --services | grep -qx "$s"; then
151158
echo "$s starts by default and should not"; exit 1

0 commit comments

Comments
 (0)