chore: padroniza arquitetura Ciberfauna, elevação root na abertura e CI multi-arch no runner ARM
CI / Formatação e clippy (push) Successful in 20s
CI / Auditoria de dependências (push) Successful in 9s
CI / Compila o app desktop (Linux) (push) Successful in 1m55s
Release / Cria a release (push) Successful in 5s
CI / Testes (Linux) (push) Successful in 4m25s
Release / CLI (linux-aarch64) (push) Successful in 2m18s
Release / CLI (linux-x86_64) (push) Successful in 2m51s
Release / App desktop (linux-aarch64) (push) Successful in 9m19s
Release / App desktop (linux-x86_64) (push) Failing after 11m11s
Release / App desktop (windows) (push) Successful in 10m27s
Release / Monta o latest.json (push) Skipped
CI / Formatação e clippy (push) Successful in 20s
CI / Auditoria de dependências (push) Successful in 9s
CI / Compila o app desktop (Linux) (push) Successful in 1m55s
Release / Cria a release (push) Successful in 5s
CI / Testes (Linux) (push) Successful in 4m25s
Release / CLI (linux-aarch64) (push) Successful in 2m18s
Release / CLI (linux-x86_64) (push) Successful in 2m51s
Release / App desktop (linux-aarch64) (push) Successful in 9m19s
Release / App desktop (linux-x86_64) (push) Failing after 11m11s
Release / App desktop (windows) (push) Successful in 10m27s
Release / Monta o latest.json (push) Skipped
This commit is contained in:
1 parent
009c3d61de
commit
2786d28e7e
98 files changed
+10594
-372
No files matched your search
@@ -2,8 +2,11 @@
|
||||
"""Teste de scripts/make-latest-json.py: python3 scripts/test_make_latest_json.py"""
|
||||
import importlib.util
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
spec = importlib.util.spec_from_file_location("m", os.path.join(os.path.dirname(__file__), "make-latest-json.py"))
|
||||
m = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(m)
|
||||
@@ -12,7 +15,7 @@ BASE = "https://git.lucasrguerra.dev.br/lucasrguerra/guara/releases/download/v1.
|
||||
|
||||
|
||||
def assets(version="1.3.2"):
|
||||
names = [p.format(v=version) for _, p in m.PLATFORMS]
|
||||
names = [patterns[0].format(v=version) for _, patterns in m.PLATFORMS]
|
||||
return {n: (BASE + n, f"assinatura-de-{n}\n") for n in names}
|
||||
|
||||
|
||||
@@ -25,11 +28,11 @@ class LatestJson(unittest.TestCase):
|
||||
for k in ("linux-x86_64", "linux-x86_64-appimage", "linux-aarch64", "windows-x86_64", "windows-x86_64-nsis"):
|
||||
self.assertIn(k, p)
|
||||
self.assertTrue(p["windows-x86_64"]["url"].endswith("x64-setup.exe"))
|
||||
self.assertEqual(p["linux-x86_64"]["signature"], "assinatura-de-Guara_1.3.2_amd64.AppImage")
|
||||
self.assertEqual(p["linux-x86_64"]["signature"], "assinatura-de-Guará_1.3.2_amd64.AppImage")
|
||||
|
||||
def test_missing_package_is_left_out(self):
|
||||
a = assets()
|
||||
del a["Guara_1.3.2_x64-setup.exe"]
|
||||
del a["Guará_1.3.2_x64-setup.exe"]
|
||||
d = m.build("1.3.2", "", a, "2026-10-30T12:00:00Z")
|
||||
self.assertNotIn("windows-x86_64", d["platforms"])
|
||||
self.assertIn("linux-x86_64", d["platforms"])
|
||||
@@ -38,6 +41,15 @@ class LatestJson(unittest.TestCase):
|
||||
d = m.build("1.3.2", "", assets("1.2.0"), "2026-10-30T12:00:00Z")
|
||||
self.assertEqual(d["platforms"], {})
|
||||
|
||||
def test_accepts_legacy_unaccented_name(self):
|
||||
a = assets()
|
||||
old = "Guara_1.3.2_amd64.AppImage"
|
||||
_, sig = a.pop("Guará_1.3.2_amd64.AppImage")
|
||||
a[old] = (BASE + old, sig)
|
||||
d = m.build("1.3.2", "", a, "2026-10-30T12:00:00Z")
|
||||
self.assertIn("linux-x86_64", d["platforms"])
|
||||
self.assertTrue(d["platforms"]["linux-x86_64"]["url"].endswith(old))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user