From 8b08b081c58f2cae0b2a94e6c6a77d95c50a2d8b Mon Sep 17 00:00:00 2001 From: Edouard Vanbelle Date: Fri, 5 Jun 2026 14:18:27 +0200 Subject: [PATCH] chore(ci): check icons and i18n --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ justfile | 11 +++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8713edb0..8ccaa391 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,10 @@ jobs: - '.grit' - '.stylelintrc.json' - 'jsconfig.json' + # Audit scripts that gate frontend correctness — touch + # them and the frontend job must re-run. + - 'tools/check-missing-translations.py' + - 'tools/check-icons.py' backend: - 'src/**' - 'Cargo.toml' @@ -75,6 +79,24 @@ jobs: - name: Run TypeScript check run: tsc -p jsconfig.json --noEmit + - name: Check locale files are at parity with en.json + # Python 3 stdlib only — no setup step needed. + # `--check-only` keeps the CI log terse; failures still surface + # via exit code (the script returns 1 when any non-English + # locale is missing a key present in en.json). Mirrors the + # `--check-only` flag on `tools/check-icons.py` below. + # Run locally without --check-only to see the missing keys. + run: python3 tools/check-missing-translations.py --check-only + + - name: Check FA icons referenced in static/ are registered + # `--check-only` skips the Font-Awesome clone and the icons.js + # patch — it just scans `fas fa-` references and diffs + # them against OxiIcons. Exit 1 if any used icon is absent + # from the registry. Run locally without --check-only to + # auto-add missing entries from a checked-out Font-Awesome + # source. + run: python3 tools/check-icons.py --check-only + rust-fmt: name: Rustfmt needs: changes diff --git a/justfile b/justfile index 9e77e0b1..5b1a9ba0 100644 --- a/justfile +++ b/justfile @@ -74,8 +74,8 @@ db-down: front-dev: PROFILE=dev cargo run -# front: check all (linter, format, type, ...) -front-check: front-fmt front-lint front-type front-rules +# front: check all (linter, format, type, icons, translations...) +front-check: front-fmt front-lint front-type front-rules front-check-icons front-check-i18n front-fmt: biome format static/ @@ -91,6 +91,13 @@ front-type: front-rules: stylelint static/css/ +front-check-icons: + tools/check-icons.py --check-only + +front-check-i18n: + tools/check-missing-translations.py --check-only + + # end-to-end Playwright tests front-test: cd tests/e2e && npm test