-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: move hardware tests over to github actions
[skip_ci] c'mon, do something ...
- Loading branch information
Showing
6 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Core hardware | ||
|
||
on: | ||
schedule: | ||
- cron: '15 23 * * *' # every day @ 23:15 | ||
workflow_dispatch: | ||
pull_request: # TODO remove | ||
|
||
jobs: | ||
# core_hardware_test: | ||
# name: Selfhosted runner test | ||
# runs-on: runner5 | ||
# env: | ||
# TREZOR_MODEL: T | ||
# PYOPT: 0 | ||
# # BOOTLOADER_DEVEL: 1 | ||
# DISABLE_OPTIGA: 1 | ||
# PYTEST_TIMEOUT: 300 | ||
# TREZOR_PYTEST_SKIP_ALTCOINS: 1 | ||
# TT_UHUB_LOCATION: "1-3" | ||
# TT_UHUB_PORT: "1" | ||
# # NIX_PATH: "nixpkgs=channel:nixos-23.11" | ||
# 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 tt core/build/firmware/firmware.bin" | ||
# - run: nix-shell --run "poetry run trezorctl list" | ||
# - run: nix-shell --run "poetry run trezorctl get-features" | ||
# - run: | | ||
# nix-shell --arg hardwareTest true --run "ls -l /dev/tty*" | ||
# # TODO explain | ||
# 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 -k 'not authenticate and not recovery'" | ||
# - run: cat trezor.log | ||
# if: always() | ||
|
||
core_hardware_test: | ||
name: Device tests | ||
runs-on: [self-hosted, ${{ matrix.model == 'T2B1' && 'hw-t2b1' || 'runner5' }}] # FIXME use hw-t2t1 after it's removed from runner0 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
model: [T2T1, T2B1] # FIXME t1b1 | ||
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' }} | ||
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 tt core/build/firmware/firmware.bin" | ||
- run: nix-shell --run "poetry run trezorctl list" | ||
- run: nix-shell --run "poetry run trezorctl get-features" | ||
- run: | | ||
nix-shell --arg hardwareTest true --run "ls -l /dev/tty*" | ||
echo $TT_UHUB_PORT/$TT_UHUB_LOCATION | ||
# 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 -k 'not authenticate and not recovery'" | ||
- run: tail -n50 tests/trezor.log || true | ||
if: failure() | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: core-hardware-${{ matrix.model }} | ||
path: trezor.log | ||
retention-days: 7 | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,5 @@ include: | |
- ci/prebuild.yml | ||
- ci/build.yml | ||
- ci/test.yml | ||
- ci/test-hw.yml | ||
- ci/posttest.yml | ||
- ci/deploy.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters