diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f36ba6..7de7733 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,9 @@ jobs: frontend: name: Frontend - runs-on: ubuntu-latest + # Pinned: Playwright 1.56.1 cannot install Chromium on the ubuntu-latest image + # (ubuntu 26.04, "Playwright does not support chromium on ubuntu26.04-x64"). + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 with: diff --git a/tests/safety/test_overrides.py b/tests/safety/test_overrides.py index 74e73aa..fd4adb5 100644 --- a/tests/safety/test_overrides.py +++ b/tests/safety/test_overrides.py @@ -128,7 +128,12 @@ def test_next_day_resume_is_strictly_later_and_within_48_hours(now: datetime, ho policy = OverridePolicy(resume_time=datetime(2000, 1, 1, hour).time()) # noqa: DTZ001 resume = overrides.resume_at(policy, now, BERLIN) assert now < resume <= now + timedelta(hours=48) - assert resume.astimezone(BERLIN).hour == hour + local = resume.astimezone(BERLIN) + # On the spring-forward day the wall time in the DST gap does not exist (02:xx in + # Berlin); it resolves to the same instant one hour later on the clock. + wall = datetime(local.year, local.month, local.day, hour, tzinfo=BERLIN) + in_gap = wall.astimezone(UTC).astimezone(BERLIN).hour != hour + assert local.hour == (hour + 1 if in_gap else hour) def test_hold_resume_expire() -> None: