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

Allowing different chain binaries for integration tests #2909

Merged
merged 36 commits into from
Dec 7, 2022

Conversation

ljoss17
Copy link
Contributor

@ljoss17 ljoss17 commented Nov 29, 2022

Closes: #2003

Description

This PR changes the environment variables CHAIN_COMMAND_PATH and ACCOUNT_PREFIX to CHAIN_COMMAND_PATHS and ACCOUNT_PREFIXES which now take a coma separated list of string. This means that the old format still works. e.g.:

CHAIN_COMMAND_PATH=gaiad8 ACCOUNT_PREFIX=cosmos cargo -p test ibc-integration-test

Which will run all tests with gaia8.

But a new format is available, e.g.:

CHAIN_COMMAND_PATH=gaiad8,evmosd ACCOUNT_PREFIX=cosmos,evmos cargo -p test ibc-integration-test

Which will run single chain tests with gaia8, binary chain tests with gaia8 <-> evmos and N-ary chain tests will have alternating gaia8 and evmos chains.

New CI job

The new CI job, multi-chains-test, which runs the tests with all combinations of chains can be seen here https://github.com/informalsystems/hermes/actions/runs/3628936071/jobs/6120570278


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

ljoss17 and others added 29 commits November 29, 2022 10:21
…length and added test between Gaia6 and Gaia7
…of same length and added test between Gaia6 and Gaia7"

This reverts commit be0a746.
@ljoss17 ljoss17 requested a review from romac December 6, 2022 14:04
@ljoss17 ljoss17 marked this pull request as ready for review December 6, 2022 14:16
fail-fast: false
matrix:
package1: [.#gaia6, .#gaia7, .#gaia8, .#ibc-go-v2-simapp, .#ibc-go-v3-simapp, .#ibc-go-v4-simapp, .#ibc-go-v5-simapp, .#ibc-go-v6-simapp, .#wasmd, .#evmos, .#osmosis]
package2: [.#gaia6, .#gaia7, .#gaia8, .#ibc-go-v2-simapp, .#ibc-go-v3-simapp, .#ibc-go-v4-simapp, .#ibc-go-v5-simapp, .#ibc-go-v6-simapp, .#wasmd, .#evmos, .#osmosis]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could make it a matrix of dictionaries. Something like:

matrix:
  first-package:
    - package: gaia6
      chain_command_path: gaiad
      account_prefix: cosmos

Then we don't need the exclude list below.

Btw I am not quite sure why we need to specify the .# prefix everywhere here. It might be simpler to write it as nix shell .#${{ matrix.first_package.package }}.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see good idea thank you.

The prefix .# is from an earlier solution, it is not needed anymore I will remove it

@@ -114,6 +114,123 @@ jobs:
test -p ibc-integration-test --no-fail-fast -- \
--nocapture --test-threads=2

multi-chains-test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we comment this to test on this branch, and then uncomment it again before merging once this pass?

@ljoss17 ljoss17 merged commit c950ca9 into master Dec 7, 2022
@ljoss17 ljoss17 deleted the luca_joss/different-chains-for-integration-tests branch December 7, 2022 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow different chain executables to be used during integration test
2 participants