diff --git a/ci/posttest.yml b/ci/posttest.yml index 7e3456e2e..ba81f4985 100644 --- a/ci/posttest.yml +++ b/ci/posttest.yml @@ -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 diff --git a/ci/prepare_ui_artifacts.py b/ci/prepare_ui_artifacts.py index 9f484ab36..c96908018 100644 --- a/ci/prepare_ui_artifacts.py +++ b/ci/prepare_ui_artifacts.py @@ -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) diff --git a/ci/test.yml b/ci/test.yml index 1bdd97ac0..1023a503e 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -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