Install Playwright browsers in CI test jobs #96

Merged
lukas merged 2 commits from staging-test into main 2026-06-12 15:50:20 +00:00
3 changed files with 29 additions and 0 deletions
+3
View File
@@ -19,6 +19,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: uv sync --frozen run: uv sync --frozen
- name: Install Playwright browsers
run: uv run playwright install --with-deps chromium
- name: Run Migrations - name: Run Migrations
run: uv run python manage.py migrate run: uv run python manage.py migrate
+23
View File
@@ -44,6 +44,29 @@ jobs:
- name: Summary - name: Summary
run: echo "Deployed to https://${HOST}" >> "$GITHUB_STEP_SUMMARY" run: echo "Deployed to https://${HOST}" >> "$GITHUB_STEP_SUMMARY"
- name: Comment staging URL on PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
auth="Authorization: token ${GITHUB_TOKEN}"
api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}"
pr=$(curl -fsS -H "$auth" "${api}/pulls?state=open&limit=50" \
| jq -r --arg branch "$BRANCH" '.[] | select(.head.ref == $branch) | .number' | head -n1)
if [ -z "$pr" ]; then
echo "No open PR for branch '${BRANCH}', skipping comment"
exit 0
fi
body="Staging deployment: https://${HOST}"
if curl -fsS -H "$auth" "${api}/issues/${pr}/comments" \
| jq -e --arg body "$body" 'any(.[]; .body == $body)' >/dev/null; then
echo "Staging URL already commented on PR #${pr}"
exit 0
fi
curl -fsS -X POST -H "$auth" -H 'Content-Type: application/json' \
-d "$(jq -n --arg body "$body" '{body: $body}')" \
"${api}/issues/${pr}/comments" >/dev/null
echo "Commented staging URL on PR #${pr}"
teardown: teardown:
if: github.event_name == 'delete' && github.event.ref_type == 'branch' if: github.event_name == 'delete' && github.event.ref_type == 'branch'
runs-on: ubuntu-latest runs-on: ubuntu-latest
+3
View File
@@ -19,6 +19,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: uv sync --frozen run: uv sync --frozen
- name: Install Playwright browsers
run: uv run playwright install --with-deps chromium
- name: Run Migrations - name: Run Migrations
run: uv run python manage.py migrate run: uv run python manage.py migrate