From 9af4e72ffd715bfbbc9d0a2bb7d3f616272c5d6b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 3 Oct 2022 12:26:12 -0700 Subject: [PATCH] pre-commit: test translations (#25695) * add test translations to precommit * fix test translations pre-commit hook * revert * fix that * add to release files add to release files * fix * don't run test on stripped dir * fix old-commit-hash: 6393d29b0437417fe15cbc9eca5c87534531e9bd --- .github/workflows/selfdrive_tests.yaml | 2 +- .pre-commit-config.yaml | 7 +++++++ release/files_common | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 9606c05631..d4971a4339 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -62,7 +62,7 @@ jobs: cp .pylintrc $STRIPPED_DIR cp mypy.ini $STRIPPED_DIR cd $STRIPPED_DIR - ${{ env.RUN }} "pre-commit run --all" + ${{ env.RUN }} "SKIP=test_translations pre-commit run --all" build_all: name: build all diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1696e823c..25b8490f92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,3 +70,10 @@ repos: - --quiet - --force - -j8 +- repo: local + hooks: + - id: test_translations + name: test translations + entry: selfdrive/ui/tests/test_translations.py + language: script + pass_filenames: false diff --git a/release/files_common b/release/files_common index 5783edd070..0c341eb3f6 100644 --- a/release/files_common +++ b/release/files_common @@ -305,6 +305,8 @@ selfdrive/ui/soundd/soundd selfdrive/ui/soundd/.gitignore selfdrive/ui/translations/*.ts selfdrive/ui/translations/languages.json +selfdrive/ui/update_translations.py +selfdrive/ui/tests/test_translations.py selfdrive/ui/qt/*.cc selfdrive/ui/qt/*.h