mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
Merge origin/main (v1.44.2) into fix/v145-sheet-motion
next stays on main's 16.4.2 (the RCE and Server Actions advisories) with its two companions; release's newer dev tools and its own additions are kept. The lockfile is release's, re-resolved. pt-BR, which main does not have, takes the one key main added.
This commit is contained in:
commit
9c8972bc96
86 files changed
+5051
-487
No files matched your search
+16
-16
@@ -14,9 +14,10 @@ updates:
|
||||
# single bumps: patch and minor updates travel together and pass the
|
||||
# same checks once. Majors stay single so each gets its own review.
|
||||
#
|
||||
# The Next.js line travels alone: while a 16.4 patch is still being
|
||||
# re-measured, a red Next bump inside the group holds every harmless
|
||||
# update in it red as well.
|
||||
# The Next.js line travels alone. Its bumps are the ones that move
|
||||
# URL state after history traversal (see the note on 16.4 below), and a
|
||||
# red Next bump inside the group would hold every harmless update in
|
||||
# it red as well.
|
||||
production-weekly:
|
||||
dependency-type: "production"
|
||||
update-types:
|
||||
@@ -32,19 +33,18 @@ updates:
|
||||
exclude-patterns:
|
||||
- "eslint-config-next"
|
||||
- "@next/bundle-analyzer"
|
||||
ignore:
|
||||
# Next 16.4.0 breaks URL state after history traversal: with a sheet
|
||||
# opened through `?doc=`, Back leaves it open, and `[` / `]` sometimes
|
||||
# do not move `?day=`. Reproduced in three end-to-end journeys (3 of 40
|
||||
# repeated runs on 16.4.0, 0 of 80 on 16.3.8 with everything else
|
||||
# equal). 16.3.8 carries every published security fix, so the line
|
||||
# waits for a 16.4 patch; the two packages that move with it wait too.
|
||||
- dependency-name: "next"
|
||||
versions: ["16.4.0"]
|
||||
- dependency-name: "eslint-config-next"
|
||||
versions: ["16.4.0"]
|
||||
- dependency-name: "@next/bundle-analyzer"
|
||||
versions: ["16.4.0"]
|
||||
# No ignore for the Next.js line any more. 16.4.0 lost URL state after
|
||||
# history traversal: with a sheet opened through `?doc=`, Back left it
|
||||
# open, and `[` / `]` sometimes did not move `?day=` (3 of 40 repeated
|
||||
# runs of three end-to-end journeys, 0 of 80 on 16.3.8). 16.4.2 does the
|
||||
# same (the day keys lost a step in 2 of 20 runs locally, the `?doc=`
|
||||
# journey failed once in CI). Both were ours to fix: the sheet followed
|
||||
# `useSearchParams`, which 16.4 updates after the write it copies, and a
|
||||
# day step wrote the URL before Next had adopted the previous step, whose
|
||||
# late adoption then put the older URL back. The sheet now follows the
|
||||
# address bar and a step waits for the layer. Measured after both fixes:
|
||||
# 200 of 200 repeated runs of the three journeys, and another 80 of 80
|
||||
# each for the `?doc=` and day-key journeys.
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
|
||||
+117
-18
@@ -23,9 +23,16 @@ jobs:
|
||||
# Two shards grew to 14–19 minutes against the 20-minute cap once the
|
||||
# mobile route sweep landed, and a slow runner tipped them over; three
|
||||
# shards with a 30-minute cap leave room for both.
|
||||
# Every Playwright job runs inside Microsoft's Playwright image, which ships
|
||||
# the browsers with their system libraries: installing them from apt at run
|
||||
# time stalled shards for 29 minutes twice, once for WebKit and once for
|
||||
# Chromium alone.
|
||||
shard:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: playwright-version
|
||||
timeout-minutes: 30
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v${{ needs.playwright-version.outputs.version }}-noble
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -38,8 +45,6 @@ jobs:
|
||||
POSTGRES_USER: healthlog
|
||||
POSTGRES_PASSWORD: healthlog
|
||||
POSTGRES_DB: healthlog
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U healthlog"
|
||||
--health-interval 5s
|
||||
@@ -47,7 +52,8 @@ jobs:
|
||||
--health-retries 10
|
||||
|
||||
env:
|
||||
DATABASE_URL: postgresql://healthlog:healthlog@localhost:5432/healthlog?schema=public
|
||||
# Inside a job container the service is reached by its name.
|
||||
DATABASE_URL: postgresql://healthlog:healthlog@postgres:5432/healthlog?schema=public
|
||||
ENCRYPTION_KEYS: '{"v1":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}'
|
||||
ENCRYPTION_ACTIVE_KEY_ID: v1
|
||||
API_TOKEN_HMAC_KEY: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
@@ -56,10 +62,16 @@ jobs:
|
||||
AUTH_RP_ORIGIN: http://localhost:3000
|
||||
SESSION_COOKIE_SECURE: "false"
|
||||
NODE_ENV: production
|
||||
# The WebKit spec runs in the `webkit` job below.
|
||||
E2E_SKIP_WEBKIT: "1"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# The image runs as root while the checkout belongs to the runner user;
|
||||
# git refuses such a tree, and the prepare hook calls git.
|
||||
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
@@ -73,16 +85,6 @@ jobs:
|
||||
|
||||
- run: pnpm db:migrate:deploy
|
||||
|
||||
- name: Cache Playwright browsers
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
playwright-${{ runner.os }}-
|
||||
|
||||
- run: pnpm exec playwright install --with-deps chromium
|
||||
|
||||
# `pnpm build` (not bare `next build`): the prebuild hook generates
|
||||
# the versioned service-worker stamp AND the static i18n catalog
|
||||
# assets (public/i18n/<locale>.js) the client boots from — without
|
||||
@@ -125,19 +127,116 @@ jobs:
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
# The Playwright image must carry the browsers of the exact Playwright the
|
||||
# lockfile resolves, or the run refuses them. Read the version from the
|
||||
# lockfile so a dependency bump moves the image with it.
|
||||
playwright-version:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
version: ${{ steps.read.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
sparse-checkout: pnpm-lock.yaml
|
||||
sparse-checkout-cone-mode: false
|
||||
- id: read
|
||||
run: |
|
||||
version=$(grep -m1 -E "^ playwright-core@[0-9]" pnpm-lock.yaml | sed -E "s/^ playwright-core@([0-9.]+):.*/\1/")
|
||||
if [ -z "$version" ]; then echo "playwright-core not found in pnpm-lock.yaml"; exit 1; fi
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# The WebKit spec (`bottom-sheet.spec.ts`, project `webkit-iphone`), in the
|
||||
# same image as the shards.
|
||||
webkit:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: playwright-version
|
||||
timeout-minutes: 30
|
||||
name: e2e webkit
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v${{ needs.playwright-version.outputs.version }}-noble
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: healthlog
|
||||
POSTGRES_PASSWORD: healthlog
|
||||
POSTGRES_DB: healthlog
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U healthlog"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 10
|
||||
|
||||
env:
|
||||
# Inside a job container the service is reached by its name.
|
||||
DATABASE_URL: postgresql://healthlog:healthlog@postgres:5432/healthlog?schema=public
|
||||
ENCRYPTION_KEYS: '{"v1":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}'
|
||||
ENCRYPTION_ACTIVE_KEY_ID: v1
|
||||
API_TOKEN_HMAC_KEY: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
AUTH_RP_NAME: HealthLog
|
||||
AUTH_RP_ID: localhost
|
||||
AUTH_RP_ORIGIN: http://localhost:3000
|
||||
SESSION_COOKIE_SECURE: "false"
|
||||
NODE_ENV: production
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# The image runs as root while the checkout belongs to the runner user;
|
||||
# git refuses such a tree, and the prepare hook calls git.
|
||||
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
||||
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- run: pnpm db:generate
|
||||
|
||||
- run: pnpm db:migrate:deploy
|
||||
|
||||
- run: NODE_OPTIONS=--max-old-space-size=8192 pnpm build
|
||||
|
||||
- run: pnpm exec playwright test --project=webkit-iphone
|
||||
env:
|
||||
E2E_BASE_URL: http://localhost:3000
|
||||
|
||||
- name: Upload Playwright HTML report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: playwright-report-webkit
|
||||
path: playwright-report/
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Upload Playwright JSON report
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: playwright-json-shard-webkit
|
||||
path: playwright-json/results.json
|
||||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
|
||||
# Branch protection requires a check named exactly "e2e". This job carries
|
||||
# that name and answers for both shards: it fails when any shard failed or
|
||||
# was cancelled, so a half-green matrix cannot satisfy the gate.
|
||||
# that name and answers for every shard and the WebKit job: it fails when
|
||||
# any of them failed or was cancelled, so a half-green run cannot satisfy
|
||||
# the gate.
|
||||
e2e:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: shard
|
||||
needs: [shard, webkit]
|
||||
if: always()
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Every shard finished green
|
||||
run: |
|
||||
if [ "${{ needs.shard.result }}" != "success" ]; then
|
||||
echo "shard result: ${{ needs.shard.result }}"
|
||||
if [ "${{ needs.shard.result }}" != "success" ] || [ "${{ needs.webkit.result }}" != "success" ]; then
|
||||
echo "shard result: ${{ needs.shard.result }}, webkit result: ${{ needs.webkit.result }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user