chore(ci): all languages option for crowdin context workflow [no changelog]
What changed, and why it matters
This commit is a routine internal cleanup of the project's GitHub Actions CI workflow. It refactors a workflow that generates UI screenshots for translators so it can run for either one selected language or all supported languages. There is no change to the Trezor firmware code, device behavior, secrets handling, or user-facing functionality.
No security action required. This is a normal CI refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff extracts the language-specific context-test job from .github/workflows/crowdin-ui-check.yml into a new reusable workflow .github/workflows/crowdin-ui-check-reuse.yml, and adds an all-languages boolean input to dispatch either the single-language or all-languages variant. The AWS role ARN, S3 bucket, and OIDC permission model remain unchanged. No firmware, bootloader, crypto, or application code is modified.
Changed components
.github/workflows/crowdin-ui-check.yml.github/workflows/crowdin-ui-check-reuse.ymlInspect captured patch +96 / −68
diff --git a/.github/workflows/crowdin-ui-check-reuse.yml b/.github/workflows/crowdin-ui-check-reuse.yml
new file mode 100644
index 00000000..f81ad51e
--- /dev/null
+++ b/.github/workflows/crowdin-ui-check-reuse.yml
@@ -0,0 +1,79 @@
+name: Generate UI flows for Crowdin localization work
+
+on:
+ workflow_call:
+ inputs:
+ languages:
+ description: Languages to generate UI flows for (JSON array)
+ required: true
+ type: string
+
+permissions:
+ id-token: write # for fetching OIDC token for AWS
+
+env:
+ CROWDIN_COMMENT_PATH: ${{ github.workspace }}/tests/core-crowdin-comment.md
+ TREZOR_PYTEST_LOGS_DIR: ${{ github.workspace }}/tests/
+
+jobs:
+ core_context_tests:
+ name: Context tests (${{ matrix.model }}, universal, noasan, ${{ matrix.language }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ model: [T2T1, T3B1, T3T1, T3W1]
+ language: ${{ fromJSON(inputs.languages) }}
+
+ env:
+ TREZOR_PROFILING: 0
+ TREZOR_MODEL: ${{ matrix.model }}
+ ADDRESS_SANITIZER: 0
+ PYTEST_TIMEOUT: 400
+ TEST_LANG: ${{ matrix.language }}
+ TESTOPTS: "@../tests/context_tests.txt --ui=test"
+
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ submodules: recursive
+ - uses: actions/download-artifact@v7
+ with:
+ name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
+ path: core/build/unix
+ - run: chmod +x core/build/unix/trezor-emu-core*
+ - uses: ./.github/actions/environment
+ - run: nix-shell --run "uv run make -C core test_emu_multicore"
+ - run: tail -v -n50 tests/trezor*.log || true
+ if: failure()
+ - uses: ./.github/actions/ui-report
+ with:
+ model: ${{ matrix.model }}
+ lang: ${{ matrix.language }}
+ status: ${{ job.status }}
+ if: always()
+ continue-on-error: true
+
+ core_ui_comment:
+ name: Comment with UI flows
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ - run: sleep 1m # to avoid GitHub API rate limit
+ - run: |
+ python ci/make_crowdin_comment.py "${{ github.run_id }}" '${{ inputs.languages }}' > ${{ env.CROWDIN_COMMENT_PATH }}
+ cat ${{ env.CROWDIN_COMMENT_PATH }} >> $GITHUB_STEP_SUMMARY
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v4
+ with:
+ role-to-assume: arn:aws:iam::538326561891:role/gh_actions_deploy_dev_firmware_data
+ aws-region: eu-west-1
+ - run: python ci/make_summary_htmls.py "index" '${{ inputs.languages }}' "tests/ui_tests/reporting/"
+ - run: python ci/make_summary_htmls.py "diff" '${{ inputs.languages }}' "tests/ui_tests/reporting/"
+ - name: Upload per-language HTML summaries to S3
+ run: |
+ cd tests/ui_tests/reporting/
+ for F in *.html
+ do
+ aws s3 cp $F s3://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/$F
+ done
diff --git a/.github/workflows/crowdin-ui-check.yml b/.github/workflows/crowdin-ui-check.yml
index 77f74834..7f30ed89 100644
--- a/.github/workflows/crowdin-ui-check.yml
+++ b/.github/workflows/crowdin-ui-check.yml
@@ -1,5 +1,5 @@
name: Crowdin - context generation (manual)
-run-name: Crowdin - <${{ inputs.language }}> language context generation
+run-name: ${{ inputs.all-languages && 'Crowdin - every language context generation' || format('Crowdin - <{0}> language context generation', inputs.language) }}
on:
workflow_dispatch:
@@ -15,13 +15,11 @@ on:
- de
- es
- pt
-
-permissions:
- id-token: write # for fetching OIDC token for AWS
-
-env:
- CROWDIN_COMMENT_PATH: ${{ github.workspace }}/tests/core-crowdin-comment.md
- TREZOR_PYTEST_LOGS_DIR: ${{ github.workspace }}/tests/
+ all-languages:
+ description: Generate UI flows for all languages (overrides language input)
+ required: false
+ type: boolean
+ default: false
jobs:
core_emu:
@@ -53,65 +51,16 @@ jobs:
# Context tests for Core. Generates screenshots of UI flows of curated list of tests
# for selected language. To be used as context for Crowdin localization work.
- core_context_tests:
- name: Context tests (${{ matrix.model }}, universal, noasan, ${{ matrix.language }})
- runs-on: ubuntu-latest
+ core_context_tests_single_language:
needs: core_emu
- strategy:
- fail-fast: false
- matrix:
- model: [T2T1, T3B1, T3T1, T3W1]
- language: ["en", "${{ inputs.language }}"]
+ if: ${{ !inputs.all-languages }}
+ uses: ./.github/workflows/crowdin-ui-check-reuse.yml
+ with:
+ languages: '["en", "${{ inputs.language }}"]'
- env:
- TREZOR_PROFILING: 0
- TREZOR_MODEL: ${{ matrix.model }}
- ADDRESS_SANITIZER: 0
- PYTEST_TIMEOUT: 400
- TEST_LANG: ${{ matrix.language }}
- TESTOPTS: "@../tests/context_tests.txt --ui=test"
-
- steps:
- - uses: actions/checkout@v6
- with:
- submodules: recursive
- - uses: actions/download-artifact@v7
- with:
- name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
- path: core/build/unix
- - run: chmod +x core/build/unix/trezor-emu-core*
- - uses: ./.github/actions/environment
- - run: nix-shell --run "uv run make -C core test_emu_multicore"
- - run: tail -v -n50 tests/trezor*.log || true
- if: failure()
- - uses: ./.github/actions/ui-report
- with:
- model: ${{ matrix.model }}
- lang: ${{ matrix.language }}
- status: ${{ job.status }}
- if: always()
- continue-on-error: true
-
- core_ui_comment:
- name: Comment with UI flows
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v6
- - run: sleep 1m # to avoid GitHub API rate limit
- - run: |
- python ci/make_crowdin_comment.py "${{ github.run_id }}" '["en", "${{ inputs.language }}"]' > ${{ env.CROWDIN_COMMENT_PATH }}
- cat ${{ env.CROWDIN_COMMENT_PATH }} >> $GITHUB_STEP_SUMMARY
- - name: Configure AWS credentials
- uses: aws-actions/configure-aws-credentials@v4
- with:
- role-to-assume: arn:aws:iam::538326561891:role/gh_actions_deploy_dev_firmware_data
- aws-region: eu-west-1
- - run: python ci/make_summary_htmls.py "index" '["en", "${{ inputs.language }}"]' "tests/ui_tests/reporting/"
- - run: python ci/make_summary_htmls.py "diff" '["en", "${{ inputs.language }}"]' "tests/ui_tests/reporting/"
- - name: Upload per-language HTML summaries to S3
- run: |
- cd tests/ui_tests/reporting/
- for F in *.html
- do
- aws s3 cp $F s3://data.trezor.io/dev/firmware/ui_report/${{ github.run_id }}/$F
- done
+ core_context_tests_all_languages:
+ needs: core_emu
+ if: ${{ inputs.all-languages }}
+ uses: ./.github/workflows/crowdin-ui-check-reuse.yml
+ with:
+ languages: '["en", "cs", "fr", "de", "es", "pt"]'
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.