Skip to content

Commit

Permalink
Additional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Jan 11, 2024
1 parent 004503c commit af04dca
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_long_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Build
run: |
export PYTHONPATH=.
python ./integration_tests/test_previous_builds_are_reproducible.py --selected-builds "a.1" "a.2" "a.3"
python ./integration_tests/test_previous_builds_are_reproducible.py --selected-builds "a.1" "a.2" "a.3" "a.4"
- name: Save artifacts
uses: actions/upload-artifact@v3
Expand Down
20 changes: 18 additions & 2 deletions integration_tests/previous_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ def __init__(self, name: str,
"multisig-view": "3993cf3fb5cd18102e2b8946ea1997f6f1cc512537f453265ba1afd7378fc0c6",
"lottery-esdt": "e06b1a5c7fb71181a79e9be6b86d8ad154e5c2def4da6d2f0aa5266163823291"
},
docker_image="multiversx/sdk-rust-contract-builder:v5.4.0"
)
docker_image="multiversx/sdk-rust-contract-builder:v5.4.1"
),
PreviousBuild(
name="a.4",
project_archive_url="https://github.com/multiversx/mx-contracts-rs/archive/refs/tags/v0.45.2.1-reproducible.zip",
project_relative_path_in_archive="mx-contracts-rs-0.45.2.1-reproducible",
packaged_src_url=None,
contract_name=None,
expected_code_hashes={
"adder": "384b680df7a95ebceca02ffb3e760a2fc288dea1b802685ef15df22ae88ba15b",
"multisig": "b82f074c02e308b80cfb7144d7dc959bfac73e14dc3291837fdd8b042a7739cf",
"multisig-full": "44a0eafb3bedfd671d1df586313f716924e2e4ef00ae7bf26df2c11eb4291389",
"multisig-view": "d3e8328d525fcf196bb5bb4ce0741d9146dccb475461a693c407cdfa02334789",
"lottery-esdt": "e06b1a5c7fb71181a79e9be6b86d8ad154e5c2def4da6d2f0aa5266163823291",
"ping-pong-egld": "9283ca2f077edf2704053f0973fdd1eb90ee871ddcd672f962de4ba4422df84b"
},
docker_image="sdk-rust-contract-builder:next"
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@


def main(cli_args: List[str]):
repository_url = "https://github.com/multiversx/mx-reproducible-contract-build-example-sc"
tag = "0.4.7"
archve_subfolder = f"mx-reproducible-contract-build-example-sc-{tag}"
repository_url = "https://github.com/multiversx/mx-contracts-rs"
tag = "0.45.2.1-reproducible"
archve_subfolder = f"mx-contracts-rs-{tag}"
project_path = download_project_repository(f"{repository_url}/archive/refs/tags/v{tag}.zip", archve_subfolder)
project_path = project_path / archve_subfolder

check_project_folder_and_packaged_src_are_equivalent(
project_path=project_path,
parent_output_folder=PARENT_OUTPUT_FOLDER,
contracts=["adder", "multisig"],
contracts=["adder", "multisig", "lottery-esdt"],
)


Expand All @@ -43,7 +43,7 @@ def check_project_folder_and_packaged_src_are_equivalent(
output_folder=output_using_project
)

packaged_src_path = output_using_project / f"{contract}/{contract}-0.0.0.source.json"
packaged_src_path = next((output_using_project / contract).glob("*.source.json"))

run_docker(
project_path=None,
Expand Down

0 comments on commit af04dca

Please sign in to comment.