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

Script to run full set of backwards compatibility tests #2047

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Aug 19, 2022

Description

This PR introduces a script which reads in a json configuration of tests to run and create a Github Workflow with the specified values.

The script outputs markdown, this makes it easy to just copy paste the output into a github issue to track test results. And also ensures it is easily extendable if we want to automate the creation of github issues using the contents.

Each time we want to run tests against a different set of versions, we just need to make one of these configurations. They will likely be largely similar configurations, with different versions specified. They live under scripts/test-matricies

The script assumes you have both jq and gh installed.

The below is output from running make compatibility-tests

Raw:

## Backwards compatibility tests
### Matrix Version: main
#### TestTransferTestSuite
  - [ ] [chain A (main) -> chain B (v4.0.0)](https://github.com/cosmos/ibc-go/actions/runs/2888267079)
  - [ ] [chain A (main) -> chain B (v3.0.0)](https://github.com/cosmos/ibc-go/actions/runs/2888267530)
  - [ ] [chain A (main) -> chain B (v2.0.0)](https://github.com/cosmos/ibc-go/actions/runs/2888268007)
  - [ ] [chain A (v4.0.0) -> chain B (main)](https://github.com/cosmos/ibc-go/actions/runs/2888268466)
  - [ ] [chain A (v3.0.0) -> chain B (main)](https://github.com/cosmos/ibc-go/actions/runs/2888268658)
  - [ ] [chain A (v2.0.0) -> chain B (main)](https://github.com/cosmos/ibc-go/actions/runs/2888268900)
#### TestFeeMiddlewareTestSuite
  - [ ] [chain A (main) -> chain B (v4.0.0)](https://github.com/cosmos/ibc-go/actions/runs/2888269188)
  - [ ] [chain A (v4.0.0) -> chain B (main)](https://github.com/cosmos/ibc-go/actions/runs/2888269651)
#### TestInterchainAccountsTestSuite
  - [ ] [chain A (v0.3.2) -> chain B (v0.1.3)](https://github.com/cosmos/ibc-go/actions/runs/2888270083)
  - [ ] [chain A (v0.1.3) -> chain B (v0.3.2)](https://github.com/cosmos/ibc-go/actions/runs/2888270515)
  - [ ] [chain A (v0.2.2) -> chain B (v0.3.2)](https://github.com/cosmos/ibc-go/actions/runs/2888271011)
  - [ ] [chain A (v0.3.2) -> chain B (v0.2.2)](https://github.com/cosmos/ibc-go/actions/runs/2888271288)

Rendered:

Backwards compatibility tests

Matrix Version: main

TestTransferTestSuite

TestFeeMiddlewareTestSuite

TestInterchainAccountsTestSuite

closes: #2029


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@chatton chatton marked this pull request as ready for review August 19, 2022 09:05
@@ -25,7 +25,7 @@ on:
- master
- v0.3.2
- v0.2.2
- v0.1.2
- v0.1.3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests should pass with this version once this pr is merged

Copy link
Member

Choose a reason for hiding this comment

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

Merged!

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

This is absolute wizardry, @chatton! 🧙‍♂️

Is it possible to have also a workflow to run this tests from GitHub's UI?

e2e/README.md Outdated Show resolved Hide resolved
e2e/README.md Outdated Show resolved Hide resolved
@chatton
Copy link
Contributor Author

chatton commented Aug 19, 2022

@crodriguezvega I'm not actually sure if it's possible to trigger a workflow from inside a workflow 🤔 , but I don't see why it shouldn't work, I can look into it this!

I left it relatively simple for now, the markdown format output let's us do whatever we want with it, and we can always include the output in other workflows or processes.

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Awesome work!

@chatton chatton merged commit d982a19 into main Aug 19, 2022
@chatton chatton deleted the cian/issue#2029-add-script-to-run-the-full-set-of-backwards-compatibility-tests branch August 19, 2022 13:49
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.

Add script to run the full set of backwards compatibility tests
3 participants