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

feat: add workflow which allows to start tests against desired tag #649

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions .github/workflows/manual-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
name: Manual Testing
on:
workflow_dispatch:
inputs:
networkNodeTag:
description: 'Specify desired Network Node image tag'
required: true
default: ''
mirrorNodeTag:
description: 'Specify desired Mirror-Node image tag'
required: true
default: ''
relayTag:
description: 'Specify desired Hedera JSON-RPC Relay tag'
required: true
default: ''
run-name: Manual Test with N:${{ inputs.networkNodeTag }}, M:${{ inputs.mirrorNodeTag }} and R:${{ inputs.relayTag }}
permissions:
Nana-EC marked this conversation as resolved.
Show resolved Hide resolved
contents: write
checks: write
pull-requests: write

jobs:
ERC20Contract:
name: ERC20 Contract Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: ERC20
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

ERC721Contract:
name: ERC721 Contract Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: ERC721
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

ERC1155Contract:
name: ERC1155 Contract Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: ERC1155
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

TokenCreateContract:
name: Token Create Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: TokenCreateContract
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

TokenQueryContract:
name: Token Query Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: TokenQueryContract
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

TokenManagmentContract:
name: Token Managment Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: TokenManagmentContract
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

TokenTransferContract:
name: Token Transfer Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: TokenTransferContract
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

Proxy:
name: Proxy Upgrade Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: Proxy
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

SafeHTS:
name: SafeHTS Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: SafeHTS
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

HIP583:
name: HIP583 Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: HIP583
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

Multicall:
name: Multicall Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: Multicall
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

HRC:
name: HRC Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: HRC
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

ShanghaiOpcodes:
name: ShanghaiOpcodes Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: ShanghaiOpcodes
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

PrngSystemContract:
name: PrngSystemContract Test Suite
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: PrngSystemContract
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we should make some room for the Solidity, Yul, and OZ contracts as well? https://github.com/hashgraph/hedera-smart-contracts/blob/main/.github/workflows/solidity-tests.yml

Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be too much for this case but not a bad idea.
@georgi-l95 have you tried the run out?
How long does everything take already and then when you add the above suggestions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, we can add them, they run in parallel, so it shouldn't run longer than now, which is as long as the slowest test (around 5 minutes)


SolidityEquivalence1:
name: Solidity Equivalence Suite 1
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: 'solidityequiv1'
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

SolidityEquivalence2:
name: Solidity Equivalence Suite 2
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: 'solidityequiv2'
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

SolidityEquivalence3:
name: Solidity Equivalence Suite 3
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: 'solidityequiv3'
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

YulEquiv:
name: Yul Equivalence
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: 'yulequiv'
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}

OpenZeppelinEquiv:
name: OpenZeppelin Equivalence
uses: ./.github/workflows/test-workflow.yml
with:
testfilter: 'OZ'
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}
relayTag: ${{inputs.relayTag}}
17 changes: 10 additions & 7 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
testfilter:
required: true
type: string

env:
RELAY_IMAGE_TAG: 0.39.0
NETWORK_NODE_IMAGE_TAG: 0.45.2
HAVEGED_IMAGE_TAG: 0.45.2
MIRROR_IMAGE_TAG: 0.96.0
networkTag:
required: false
type: string
mirrorTag:
required: false
type: string
relayTag:
required: false
type: string

jobs:
acceptance-workflow:
Expand Down Expand Up @@ -47,7 +50,7 @@ jobs:
version: nightly

- name: Start the local node
run: npx hedera start -d --network local
run: npx hedera start -d --network-tag=${{inputs.networkTag}} --mirror-tag=${{inputs.mirrorTag}} --relay-tag=${{inputs.relayTag}} --verbose=trace
Copy link
Member

Choose a reason for hiding this comment

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

Question: Above I saw the networkTag, mirrorTag, relayTag are marked required:false, does that mean if those tags are not entered, local node will pick up the latest tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, local node will start with local configuration(which is usually latest tags)

Copy link
Member

@quiet-node quiet-node Jan 30, 2024

Choose a reason for hiding this comment

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

Nice work! Will be back for a full review soon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My idea with this manual workflow is to be triggered, when for example we have a new network tag. Instead of checking out repos locally, starting local-node and running tests, we can do it here with a simple click.

Copy link
Member

Choose a reason for hiding this comment

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

Nice initiative!

Nana-EC marked this conversation as resolved.
Show resolved Hide resolved
timeout-minutes: 5

- name: Run the test in ${{ inputs.testfilter }}
Expand Down
Loading
Loading