ci: add check that ensures POT files are up to date

This commit is contained in:
Leah Amelia Chen
2025-02-26 17:16:21 +01:00
parent 9360afd29f
commit 5851bad4a0

View File

@ -25,6 +25,7 @@ jobs:
- prettier
- alejandra
- typos
- translations
- test-pkg-linux
- test-debian-12
steps:
@ -593,6 +594,42 @@ jobs:
- name: typos check
run: nix develop -c typos
translations:
if: github.repository == 'ghostty-org/ghostty'
runs-on: namespace-profile-ghostty-sm
timeout-minutes: 60
env:
ZIG_LOCAL_CACHE_DIR: /zig/local-cache
ZIG_GLOBAL_CACHE_DIR: /zig/global-cache
steps:
- uses: actions/checkout@v4 # Check out repo so we can lint it
- name: Setup Cache
uses: namespacelabs/nscloud-cache-action@v1.2.0
with:
path: |
/nix
/zig
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
skipPush: true
useDaemon: false # sometimes fails on short jobs
- name: check translations
run: |
old_pot=$(mktemp)
cp po/com.mitchellh.ghostty.pot "$old_pot"
nix develop -c zig build update-translations
# Compare previous POT to current POT
msgcmp "$old_pot" po/com.mitchellh.ghostty.pot --use-untranslated
# Compare all other POs to current POT
for f in po/*.po; do msgcmp "$f" po/com.mitchellh.ghostty.pot; done
test-pkg-linux:
strategy:
fail-fast: false