Skip to content

Commit

Permalink
run hw test [skip_ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata committed Feb 21, 2024
1 parent 28b87c4 commit 6f97147
Showing 1 changed file with 1 addition and 78 deletions.
79 changes: 1 addition & 78 deletions .github/workflows/core-hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
schedule:
- cron: '15 23 * * *' # every day @ 23:15
workflow_dispatch:
pull_request:

# [Device tests](../tests/device-tests.md) that run against an actual physical Trezors.
# The device needs to have special bootloader, found in `core/embed/bootloader_ci`, that
Expand All @@ -18,50 +19,6 @@ on:
# skipped.
# See also: https://github.com/trezor/trezor-firmware/issues/1371
jobs:
core_device_test:
name: Device tests
runs-on:
- self-hosted
- ${{ matrix.model == 'T2B1' && 'runner3' || 'hw-t2t1' }}
# runner4 does not work at the moment
# - ${{ matrix.model == 'T2B1' && 'hw-t2b1' || 'hw-t2t1' }}
strategy:
fail-fast: false
matrix:
model: [T2T1, T2B1]
coins: [universal, btconly]
env:
TREZOR_MODEL: ${{ matrix.model == 'T2T1' && 'T' || 'R' }}
TREZOR_PYTEST_SKIP_ALTCOINS: ${{ matrix.coins == 'btconly' && '1' || '0' }}
PYTEST_TIMEOUT: 1200
PYOPT: 0
DISABLE_OPTIGA: 1
BOOTLOADER_DEVEL: ${{ matrix.model == 'T2B1' && '1' || '0' }}
TESTOPTS: "-k 'not authenticate and not recovery and not lots'"
TT_UHUB_PORT: 1
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/environment
- run: nix-shell --arg hardwareTest true --run uhubctl
- run: nix-shell --run "poetry run make -C core build_firmware"
- run: nix-shell --arg hardwareTest true --run "poetry run python ci/hardware_tests/bootstrap.py ${{ matrix.model }} core/build/firmware/firmware.bin"
- run: nix-shell --run "poetry run trezorctl list"
- run: nix-shell --run "poetry run trezorctl get-features"
- run: |
# log serial console to file; sleep is used because tio needs stdin that is not /dev/null
nix-shell --arg hardwareTest true --run "sleep 8h | tio --no-autoconnect /dev/ttyTREZOR &> trezor.log" &
nix-shell --run "poetry run pytest -v tests/device_tests"
- run: tail -n50 trezor.log || true
if: failure()
- uses: actions/upload-artifact@v4
with:
name: core-hardware-${{ matrix.model }}-${{ matrix.coins }}
path: trezor.log
retention-days: 7
if: always()

core_monero_test:
name: Monero tests
runs-on:
Expand Down Expand Up @@ -102,37 +59,3 @@ jobs:
path: trezor.log
retention-days: 7
if: always()

legacy_device_test:
name: Device tests T1B1
runs-on:
- self-hosted
- hw-t1b1
strategy:
fail-fast: false
matrix:
coins: [universal, btconly]
env:
TREZOR_PYTEST_SKIP_ALTCOINS: ${{ matrix.coins == 'btconly' && '1' || '0' }}
PYTEST_TIMEOUT: 1200
T1_UHUB_LOCATION: 3-1
T1_UHUB_PORT: 2
T1_CAMERA: /dev/video0 # camera device
T1_ARDUINO_SERIAL: /dev/ttyTPMB # arduino that pushes T1 buttons
BITCOIN_ONLY: ${{ matrix.coins == 'universal' && '0' || '1' }}
DEBUG_LINK: 1
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/environment
- run: nix-shell --arg hardwareTest true --run uhubctl
- run: nix-shell --run "poetry run legacy/script/setup"
- run: nix-shell --run "export PRODUCTION=0 && poetry run legacy/script/cibuild"
- run: nix-shell --arg hardwareTest true --run "ci/hardware_tests/t1_hw_test.sh"
- uses: actions/upload-artifact@v4
with:
name: legacy-hardware-${{ matrix.coins }}
path: ci/hardware_tests/*.mp4
retention-days: 7
if: always()

0 comments on commit 6f97147

Please sign in to comment.