Skip to content

Commit

Permalink
ci: adjust CI after migrating the test projects (#1513)
Browse files Browse the repository at this point in the history
* test in a random node

* Use test projects under axonweb3

* adjust sed command

* use axonweb3

* use axonweb3
  • Loading branch information
sunchengzhu authored and Eason Gao committed Nov 17, 2023
1 parent d3cf114 commit f3365e7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/hardfork_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,23 @@ jobs:
EOF
timeout-minutes: 1

- name: Checkout sunchengzhu/axon-hardfork-test
- name: Checkout axonweb3/axon-hardfork-test
uses: actions/checkout@v4
with:
repository: sunchengzhu/axon-hardfork-test
path: axon-hardfork-test

- name: Choose network
working-directory: axon-hardfork-test
run: |
node_ids=(1 2 3 4)
random_value=$(( (RANDOM % ${#node_ids[@]}) + 1 ))
network=node_"$random_value"
echo "choose network: $network"
sed -i "s/defaultNetwork: \"node_1\"/defaultNetwork: \"$network\"/" hardhat.config.ts
grep "defaultNetwork" hardhat.config.ts
- name: Run test cases before hardfork
working-directory: axon-hardfork-test
run: |
Expand All @@ -97,11 +108,7 @@ jobs:
working-directory: axon-hardfork-test
run: |
npx hardhat test --grep "check hardfork info after hardfork"
node_ids=(1 2 3 4)
random_value=$(( (RANDOM % ${#node_ids[@]}) + 1 ))
echo "Invoke system contract via node_"$random_value
npx hardhat test --grep "update max_contract_limit" --network "node_"$random_value
npx hardhat test --grep "update max_contract_limit"
npx hardhat test --grep "deploy a big contract smaller than max_contract_limit"
- name: Archive logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openzeppelin_test_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.escape_multiple_lines_test_inputs.outputs.result || 'main'}}
- uses: actions/checkout@v4
with:
repository: gpBlockchain/openzeppelin-contracts
repository: axonweb3/openzeppelin-contracts
ref: compatibillity-axon
path: openzeppelin-contracts
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openzeppelin_test_16_19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.escape_multiple_lines_test_inputs.outputs.result || 'main' }}
- uses: actions/checkout@v4
with:
repository: gpBlockchain/openzeppelin-contracts
repository: axonweb3/openzeppelin-contracts
ref: compatibillity-axon
path: openzeppelin-contracts
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openzeppelin_test_1_5_and_12_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.escape_multiple_lines_test_inputs.outputs.result || 'main' }}
- uses: actions/checkout@v4
with:
repository: gpBlockchain/openzeppelin-contracts
repository: axonweb3/openzeppelin-contracts
ref: compatibillity-axon
path: openzeppelin-contracts
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openzeppelin_test_6_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.escape_multiple_lines_test_inputs.outputs.result || 'main'}}
- uses: actions/checkout@v4
with:
repository: gpBlockchain/openzeppelin-contracts
repository: axonweb3/openzeppelin-contracts
ref: compatibillity-axon
path: openzeppelin-contracts
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v3_core_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
ref: ${{ steps.escape_multiple_lines_test_inputs.outputs.result || 'main' }}
- uses: actions/checkout@v4
with:
repository: gpBlockchain/v3-core
repository: axonweb3/v3-core
path: v3-core
- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/web3_compatible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ jobs:
fi
done
- name: Checkout gpBlockchain/axon-test
- name: Checkout axonweb3/axon-test
uses: actions/checkout@v4
with:
repository: gpBlockchain/axon-test
repository: axonweb3/axon-test
path: axon-test

- uses: actions/setup-node@v4
Expand Down

0 comments on commit f3365e7

Please sign in to comment.