Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local-ic: CI test with Python #775

Merged
merged 31 commits into from
Oct 27, 2023
Merged

local-ic: CI test with Python #775

merged 31 commits into from
Oct 27, 2023

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Sep 12, 2023

closes: #763

summary

Adds a python based local-interchain test CI pipeline

features

  • python CI pipeline w/ relaying
  • addr & port override flags
  • python poll_for_start utility
  • moved from ./scripts to ./python

todo

  • Test: contract<->contract relayer & api interaction assertions
  • Upload artifact, then run each test on its own.
  • Deterministically randomize the port for the server (both localic & script) so no runner overlap
  • Move Python to its own section
  • Re-add CW cache

@Reecepbcups Reecepbcups marked this pull request as ready for review September 14, 2023 16:09
@Reecepbcups Reecepbcups requested a review from a team as a code owner September 14, 2023 16:09
@Reecepbcups Reecepbcups requested a review from agouin September 14, 2023 16:09
@Reecepbcups Reecepbcups enabled auto-merge (squash) September 14, 2023 16:09
@Reecepbcups Reecepbcups added the BACKPORT backport into all maintained branches label Sep 14, 2023
@Reecepbcups Reecepbcups marked this pull request as draft September 28, 2023 21:45
auto-merge was automatically disabled September 28, 2023 21:45

Pull request was converted to draft

@Reecepbcups
Copy link
Member Author

I am putting PR #785 ahead, so put this back on draft. Will fix after getting that in since it is the more feature complete version now

@Reecepbcups Reecepbcups marked this pull request as ready for review October 19, 2023 12:39
# this query returns a dict with suply as the key, validate it is there
assert "supply" in rb.query("bank total")

rb.query("bank balances juno10r39fueph9fq7a6lgswu4zdsg8t3gxlq670lt0 --output=json")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there supposed to be an assert after this?

Copy link
Member Author

@Reecepbcups Reecepbcups Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Good catch - d5928ea

@Reecepbcups Reecepbcups enabled auto-merge (squash) October 26, 2023 22:39
@Reecepbcups Reecepbcups merged commit 75d3279 into main Oct 27, 2023
11 checks passed
@Reecepbcups Reecepbcups deleted the reece/localic-python-ci branch October 27, 2023 00:23
mergify bot pushed a commit that referenced this pull request Oct 27, 2023
* attempt local-ic start & python script test

* requirements httpx file

* cli: add app overrides for port and address

* ci: upload artifact, setup for python script test matrix

* run e2e test in local interchain

* run local-ic from /tmp (after archive download)

* chmod +x /tmp/local-ic

* add ibc-contract relayer test matrix

* confirm api_test fail properly breaks api_test

* poll_for_start in all python contracts

* api_test assertions

* api_test: resolve dict form

* Add global python arg parsing (api-port & address)

* attempt: multi port python script CI

* Move scripts/ to python/ folder instead

* update CI to use the new ./python repo

* cw file cache: upload if no file found

* remove new line in get_chain_start_time_from_logs

* remove cw cache for now

* re-add modified cw cache for dupe code-id upload

* minor cache tweak

* only start API after all setup is complete

* minor: touchups & nits

* match start.go to main

* fix: python test

* add ability to override tx broadcast sleeping

* re-add tx_test()

* minor: naming

* balances assertion in binary test

(cherry picked from commit 75d3279)

# Conflicts:
#	go.work.sum
#	local-interchain/go.mod
#	local-interchain/go.sum
mergify bot added a commit that referenced this pull request Oct 27, 2023
* local-ic: CI test with Python (#775)

* attempt local-ic start & python script test

* requirements httpx file

* cli: add app overrides for port and address

* ci: upload artifact, setup for python script test matrix

* run e2e test in local interchain

* run local-ic from /tmp (after archive download)

* chmod +x /tmp/local-ic

* add ibc-contract relayer test matrix

* confirm api_test fail properly breaks api_test

* poll_for_start in all python contracts

* api_test assertions

* api_test: resolve dict form

* Add global python arg parsing (api-port & address)

* attempt: multi port python script CI

* Move scripts/ to python/ folder instead

* update CI to use the new ./python repo

* cw file cache: upload if no file found

* remove new line in get_chain_start_time_from_logs

* remove cw cache for now

* re-add modified cw cache for dupe code-id upload

* minor cache tweak

* only start API after all setup is complete

* minor: touchups & nits

* match start.go to main

* fix: python test

* add ability to override tx broadcast sleeping

* re-add tx_test()

* minor: naming

* balances assertion in binary test

(cherry picked from commit 75d3279)

# Conflicts:
#	go.work.sum
#	local-interchain/go.mod
#	local-interchain/go.sum

* mod tidy

---------

Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORT backport into all maintained branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI to test in other languages: Python & Rust
2 participants