1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

ci: move ui reports to the root to simplify artifacts browsing

I wanted to use a symlink but that does not seem to work on GitLab https://gitlab.com/gitlab-org/gitlab-runner/issues/4241.
This commit is contained in:
Tomas Susanka 2020-03-04 12:33:34 +00:00
parent b22026f652
commit e3b674a42e
3 changed files with 10 additions and 8 deletions

View File

@ -30,8 +30,9 @@ core unix ui changes:
script:
- cd tests/ui_tests
- pipenv run python reporting/report_master_diff.py
- mv reporting/reports/master_diff/ ../..
artifacts:
name: core-unix-ui-changes
paths:
- tests/ui_tests/reporting/reports/master_diff
- master_diff
expire_in: 1 week

View File

@ -13,9 +13,9 @@ def _hash_files(path):
return hasher.digest().hex()
root = Path().cwd() / "../tests/ui_tests"
screens = root / "screens"
fixtures = root / "fixtures.json"
root = Path(__file__).parent / ".."
screens = root / "tests/ui_tests/screens"
fixtures = root / "tests/ui_tests/fixtures.json"
hashes = json.loads(fixtures.read_text())
@ -24,4 +24,4 @@ for test_case in hashes.keys():
expected_hash = hashes[test_case]
actual_hash = _hash_files(recorded_dir)
assert expected_hash == actual_hash
shutil.make_archive("ui_test_records/" + actual_hash, "zip", recorded_dir)
shutil.make_archive(root / "ci/ui_test_records" / actual_hash, "zip", recorded_dir)

View File

@ -19,13 +19,14 @@ core device ui test:
script:
- cd core
- pipenv run make test_emu_ui
- cd ../ci
- pipenv run python prepare_ui_artifacts.py
- cd ..
- mv tests/ui_tests/reporting/reports/test/ test_ui_report
- pipenv run python ci/prepare_ui_artifacts.py
artifacts:
name: core-device-ui-test
paths:
- ci/ui_test_records/
- tests/ui_tests/reporting/reports/test/
- test_ui_report
- tests/ui_tests/screens/
- tests/junit.xml
- tests/trezor.log