Workflow « Fresh install » : l'installation du README rejouée sur une machine vierge

Lancé à la main. Clone, .env, docker compose up -d sur le port 80 comme le
README, test de fumée, puis captures de l'app en anglais jointes au run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
IliesAllaliandClaude Opus 5.5 committed 2026-09-29 16:22:48 +02:00
1 parent 6067cd0174
commit cdcff20e22
2 files changed
+108

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
# Installation neuve en suivant le README, sur une machine vierge : clone, .env, docker compose up -d, port 80.
# Lancé à la main (onglet Actions, « Fresh install », Run workflow). Les captures sont jointes au run.
name: Fresh install
on:
workflow_dispatch:
permissions:
contents: read
jobs:
fresh-install:
name: README self-hosting steps
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Clone, as in the README
run: |
git clone https://github.com/IliesAllali/parenthese.git
cd parenthese
git log -1 --oneline
- name: .env, as in the README
working-directory: parenthese
run: |
set -euo pipefail
cp .env.example .env
# README : POSTGRES_PASSWORD en lettres et chiffres, JWT_SECRET par openssl rand -base64 48
sed -i "s|^POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$(openssl rand -hex 24)|" .env
sed -i "s|^JWT_SECRET=.*|JWT_SECRET=$(openssl rand -base64 48)|" .env
grep -Ev '^(POSTGRES_PASSWORD|JWT_SECRET)=' .env | grep -Ev '^\s*(#|$)'
- name: docker compose up -d
working-directory: parenthese
run: docker compose up -d
- name: Wait for http://localhost
run: |
for i in $(seq 1 90); do
if curl -fsS http://localhost/health | grep -Eq '"ok": ?true'; then echo "ready after $((i * 5)) s"; exit 0; fi
sleep 5
done
echo "not ready after 450 s"; exit 1
- name: Smoke test through the web port
working-directory: parenthese
run: bash tools/docker-smoke.sh http://localhost
- name: Screenshots
working-directory: parenthese
run: |
mkdir -p shots /tmp/pw
npm --prefix /tmp/pw init -y > /dev/null
npm --prefix /tmp/pw install playwright@1 > /dev/null
(cd /tmp/pw && npx playwright install --with-deps chromium > /dev/null)
cp tools/fresh-install-shots.mjs /tmp/pw/shots.mjs
node /tmp/pw/shots.mjs http://localhost "$PWD/shots"
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: fresh-install-shots
path: parenthese/shots
if-no-files-found: warn
- name: Containers and logs on failure
if: failure()
working-directory: parenthese
run: |
docker compose ps -a
docker compose logs --no-color --timestamps