Compare commits
4 Commits
master
...
ci/e2e-pat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
824016d414 | ||
|
|
16bf5e0fa3 | ||
|
|
4c9ef7fdf2 | ||
|
|
75abe0623f |
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -14,6 +14,25 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
e2e: ${{ steps.filter.outputs.e2e }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect changes for E2E
|
||||
id: filter
|
||||
uses: dorny/paths-filter@v3
|
||||
with:
|
||||
filters: |
|
||||
e2e:
|
||||
- 'frontend/**'
|
||||
- 'frontend/cypress/**'
|
||||
- 'frontend/package.json'
|
||||
- 'frontend/package-lock.json'
|
||||
- '.github/workflows/ci.yml'
|
||||
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -190,7 +209,8 @@ jobs:
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check]
|
||||
needs: [check, changes]
|
||||
if: needs.changes.outputs.e2e == 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
@@ -219,6 +219,13 @@ def test_json_safe_handles_binary_inputs() -> None:
|
||||
assert _json_safe(memoryview(b"world")) == "world"
|
||||
|
||||
|
||||
def test_json_safe_replaces_invalid_utf8_bytes() -> None:
|
||||
# Invalid UTF-8 should be replaced with U+FFFD, not crash error handling.
|
||||
assert _json_safe(b"\xff") == "\ufffd"
|
||||
assert _json_safe(bytearray(b"\xff")) == "\ufffd"
|
||||
assert _json_safe(memoryview(b"\xff")) == "\ufffd"
|
||||
|
||||
|
||||
def test_json_safe_falls_back_to_string_for_unknown_objects() -> None:
|
||||
class Weird:
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user