ci: hw: allow choosing models when running manually
What changed, and why it matters
This commit changes a GitHub Actions workflow file so that when someone manually triggers hardware device tests, they can choose which Trezor models to test. Previously the workflow always tested a fixed list of models. There is no change to the firmware code that runs on Trezor devices, and nothing in the commit suggests a security fix or vulnerability.
No security action needed. Treat as a routine CI/usability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies .github/workflows/core-hw.yml to add a workflow_dispatch input models_json and a new param job that parses the JSON model list, filters out T1B1 for core model matrices, and conditionally enables the legacy T1B1 job. The downstream core_device_test, core_monero_test, and legacy_device_test jobs now consume these computed matrix/condition outputs. No firmware, bootloader, test logic, secrets handling, or permissions are changed.
Changed components
.github/workflows/core-hw.ymlInspect captured patch +34 / −2
diff --git a/.github/workflows/core-hw.yml b/.github/workflows/core-hw.yml
index 182ddf82..09f4749a 100644
--- a/.github/workflows/core-hw.yml
+++ b/.github/workflows/core-hw.yml
@@ -4,6 +4,12 @@ on:
schedule:
- cron: '15 23 * * *' # every day @ 23:15
workflow_dispatch:
+ inputs:
+ models_json:
+ description: models as a JSON list
+ type: string
+ required: true
+ default: "[\"T1B1\",\"T2B1\",\"T2T1\",\"T3B1\",\"T3T1\",\"T3W1\"]"
# [Device tests](../tests/device-tests.md) that run against an actual physical Trezors.
# The device needs to have special bootloader, found in `core/embed/projects/bootloader_ci`, that
@@ -18,8 +24,31 @@ on:
# skipped.
# See also: https://github.com/trezor/trezor-firmware/issues/1371
jobs:
+ param:
+ name: Determine pipeline parameters
+ runs-on: ubuntu-latest
+ outputs:
+ core_models: ${{ steps.set_vars.outputs.core_models }}
+ run_legacy: ${{ steps.set_vars.outputs.run_legacy }}
+ steps:
+ - id: set_vars
+ name: Set variables
+ env:
+ MODELS: ${{ github.event_name == 'workflow_dispatch' && inputs.models_json || '["T1B1","T2B1","T2T1","T3B1","T3T1","T3W1"]' }}
+ run: |
+ echo "models_json: $MODELS"
+ CORE_MODELS=`echo $MODELS | jq -cM '[.[] | select(. != "T1B1")]'`
+ echo core_models=$CORE_MODELS >> $GITHUB_OUTPUT
+ if echo $MODELS | grep -q '"T1B1"'; then
+ echo run_legacy=1 >> $GITHUB_OUTPUT
+ else
+ echo run_legacy=0 >> $GITHUB_OUTPUT
+ fi
+ cat $GITHUB_OUTPUT
+
core_device_test:
name: Device tests
+ needs: param
runs-on:
- self-hosted
# FIXME runner4 with t2b1 does not work at the moment
@@ -27,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- model: [T2T1, T2B1, T3B1, T3T1, T3W1]
+ model: ${{ fromJSON(needs.param.outputs.core_models) }}
coins: [universal, btconly]
env:
TREZOR_MODEL: ${{ matrix.model }}
@@ -85,6 +114,7 @@ jobs:
core_monero_test:
name: Monero tests
+ needs: param
runs-on:
- self-hosted
# FIXME runner4 with t2b1 does not work at the moment
@@ -93,7 +123,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- model: [T2T1, T2B1, T3B1, T3T1, T3W1]
+ model: ${{ fromJSON(needs.param.outputs.core_models) }}
env:
TREZOR_MODEL: ${{ matrix.model }}
PYTEST_TIMEOUT: 1200
@@ -130,9 +160,11 @@ jobs:
legacy_device_test:
name: Device tests T1B1
+ needs: param
runs-on:
- self-hosted
- hw-t1b1
+ if: needs.param.outputs.run_legacy == '1'
strategy:
fail-fast: false
matrix:
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.