1616 - " pyproject.toml"
1717 - " uv.lock"
1818 - " ethernity.spec"
19- - " pyrightconfig.json"
2019 - " README_PYPI.md"
2120 - " LICENSE"
2221 pull_request :
3433 - " pyproject.toml"
3534 - " uv.lock"
3635 - " ethernity.spec"
37- - " pyrightconfig.json"
3836 - " README_PYPI.md"
3937 - " LICENSE"
4038 workflow_dispatch :
@@ -71,38 +69,16 @@ jobs:
7169 - name : Ruff format
7270 run : uv run ruff format --check src tests tooling
7371
74- mypy :
72+ typecheck :
7573 runs-on : ubuntu-latest
7674 timeout-minutes : 20
7775 steps :
7876 - name : Checkout
7977 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
8078 - name : Setup Python
8179 uses : ./.github/actions/setup-python
82- - name : Mypy
83- run : uv run mypy src tooling
84-
85- pyright :
86- runs-on : ubuntu-latest
87- timeout-minutes : 20
88- steps :
89- - name : Checkout
90- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
91- - name : Setup Python
92- uses : ./.github/actions/setup-python
93- - name : Pyright
94- run : uv run pyright
95-
96- schema :
97- runs-on : ubuntu-latest
98- timeout-minutes : 15
99- steps :
100- - name : Checkout
101- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
102- - name : Setup Python
103- uses : ./.github/actions/setup-python
104- - name : Validate CLI API schema
105- run : uv run check-jsonschema --check-metaschema docs/cli_api.schema.json
80+ - name : Pyrefly
81+ run : uv run pyrefly check --output-format=github
10682
10783 typos :
10884 runs-on : ubuntu-latest
@@ -236,27 +212,51 @@ jobs:
236212 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
237213 - name : Setup Python
238214 uses : ./.github/actions/setup-python
215+ - name : Setup Node.js
216+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
217+ with :
218+ node-version : " 20"
219+ cache : " npm"
220+ cache-dependency-path : kit/package-lock.json
221+ - name : Install kit dependencies
222+ working-directory : kit
223+ run : npm ci
224+ - name : Generate kit bundles for package artifacts
225+ working-directory : kit
226+ run : node build_kit.mjs
227+ - name : Verify generated kit bundles
228+ run : |
229+ for BUNDLE in \
230+ src/ethernity/resources/kit/recovery_kit.bundle.html \
231+ src/ethernity/resources/kit/recovery_kit.scanner.bundle.html
232+ do
233+ test -s "$BUNDLE"
234+ SIZE=$(stat -c%s "$BUNDLE" 2>/dev/null || stat -f%z "$BUNDLE")
235+ echo "Generated bundle size ($BUNDLE): $SIZE bytes"
236+ if [ "$SIZE" -lt 1000 ]; then
237+ echo "ERROR: Generated bundle seems too small, may be corrupted: $BUNDLE"
238+ exit 1
239+ fi
240+ done
239241 - name : Build wheel and sdist
240242 run : uv build --wheel --sdist --out-dir dist
241- - name : Verify wheel contents
242- run : python3 scripts/check_wheel_contents.py dist/*.whl
243+ - name : Verify package contents
244+ run : python3 scripts/check_wheel_contents.py dist/*.whl dist/*.tar.gz
243245 - name : Install built wheel
244246 run : python3 -m pip install --force-reinstall dist/*.whl
245247 - name : Smoke test installed package
246- env :
247- ETHERNITY_SKIP_PLAYWRIGHT_INSTALL : " 1"
248248 run : |
249- python3 -c "import ethernity, ethernity.cli.bootstrap.app ; print(ethernity.__file__)"
249+ python3 -c "import ethernity, ethernity.main ; print(ethernity.__file__)"
250250 python3 -m ethernity --help > /dev/null
251251 SMOKE_OUT="${RUNNER_TEMP:-/tmp}/ethernity-wheel-smoke"
252252 rm -rf "$SMOKE_OUT"
253253 mkdir -p "$SMOKE_OUT"
254- python3 -m ethernity recover \
254+ python3 -m ethernity run restore \
255255 --scan tests/fixtures/v1_2/extension_golden/raw/gzip_replacement_chain/chain/qr_document.pdf \
256256 --scan tests/fixtures/v1_2/extension_golden/raw/gzip_replacement_chain/chain/extensions/01/qr_document-01-*.pdf \
257257 --passphrase stable-v1_2-extension-passphrase \
258258 --output "$SMOKE_OUT/recovered" \
259- --quiet
259+ --yes
260260 test -d "$SMOKE_OUT/recovered"
261261
262262 kit-verify :
@@ -273,50 +273,23 @@ jobs:
273273 cache : " npm"
274274 cache-dependency-path : kit/package-lock.json
275275
276- - name : Verify committed bundles exist
276+ - name : Verify generated bundles are not committed
277277 run : |
278- for BUNDLE in \
278+ TRACKED="$(git ls-files -- \
279279 src/ethernity/resources/kit/recovery_kit.bundle.html \
280- src/ethernity/resources/kit/recovery_kit.scanner.bundle.html
281- do
282- if [ ! -f "$BUNDLE" ]; then
283- echo "ERROR: No committed bundle found at $BUNDLE"
284- echo "Run 'cd kit && node build_kit.mjs' and commit the bundles."
285- exit 1
286- fi
287- SIZE=$(stat -c%s "$BUNDLE" 2>/dev/null || stat -f%z "$BUNDLE")
288- echo "Committed bundle size ($BUNDLE): $SIZE bytes"
289- if [ "$SIZE" -lt 1000 ]; then
290- echo "ERROR: Bundle seems too small, may be corrupted: $BUNDLE"
291- exit 1
292- fi
293- done
280+ src/ethernity/resources/kit/recovery_kit.scanner.bundle.html)"
281+ if [ -n "$TRACKED" ]; then
282+ echo "ERROR: recovery kit bundles are generated release artifacts and must not be committed."
283+ echo "$TRACKED"
284+ exit 1
285+ fi
294286
295287 - name : Install kit dependencies
296288 working-directory : kit
297289 run : npm ci
298290
299- - name : Run kit tests
291+ - name : Generate kit bundles
300292 working-directory : kit
301- run : npm test
302-
303- - name : Setup Python
304- uses : ./.github/actions/setup-python
305-
306- - name : Run kit interoperability tests
307- env :
308- ETHERNITY_SKIP_PLAYWRIGHT_INSTALL : " 1"
309- run : uv run pytest tests/unit/test_kit_vectors.py tests/unit/test_kit_interop.py -v
310-
311- - name : Install libdeflate tools
312- run : |
313- sudo apt-get update
314- sudo apt-get install -y libdeflate-tools
315-
316- - name : Verify kit builds successfully
317- working-directory : kit
318- env :
319- ETHERNITY_KIT_GZIP_COMPRESSOR : libdeflate
320293 run : node build_kit.mjs
321294
322295 - name : Verify build output
@@ -326,11 +299,15 @@ jobs:
326299 ls -la src/ethernity/resources/kit/recovery_kit.scanner.bundle.html
327300 ls -la kit/dist/
328301
329- - name : Verify bundles are up to date
330- run : |
331- git diff --exit-code -- \
332- src/ethernity/resources/kit/recovery_kit.bundle.html \
333- src/ethernity/resources/kit/recovery_kit.scanner.bundle.html
302+ - name : Run kit tests
303+ working-directory : kit
304+ run : npm test
305+
306+ - name : Setup Python
307+ uses : ./.github/actions/setup-python
308+
309+ - name : Run kit interoperability tests
310+ run : uv run pytest tests/unit/test_kit_vectors.py tests/unit/test_kit_interop.py -v
334311
335312 pip-audit :
336313 runs-on : ubuntu-latest
0 commit comments