From f3365e76e34662892844c6f86f2023c5bdf430b8 Mon Sep 17 00:00:00 2001 From: sunchengzhu <36075573+sunchengzhu@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:00:12 +0800 Subject: [PATCH] ci: adjust CI after migrating the test projects (#1513) * test in a random node * Use test projects under axonweb3 * adjust sed command * use axonweb3 * use axonweb3 --- .github/workflows/hardfork_test.yml | 19 +++++++++++++------ .github/workflows/openzeppelin_test_11.yml | 2 +- .github/workflows/openzeppelin_test_16_19.yml | 2 +- .../openzeppelin_test_1_5_and_12_15.yml | 2 +- .github/workflows/openzeppelin_test_6_10.yml | 2 +- .github/workflows/v3_core_test.yml | 2 +- .github/workflows/web3_compatible.yml | 4 ++-- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/hardfork_test.yml b/.github/workflows/hardfork_test.yml index b82397151..a3597ed17 100644 --- a/.github/workflows/hardfork_test.yml +++ b/.github/workflows/hardfork_test.yml @@ -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: | @@ -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 diff --git a/.github/workflows/openzeppelin_test_11.yml b/.github/workflows/openzeppelin_test_11.yml index 0aee91c19..0bd2d1924 100644 --- a/.github/workflows/openzeppelin_test_11.yml +++ b/.github/workflows/openzeppelin_test_11.yml @@ -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 diff --git a/.github/workflows/openzeppelin_test_16_19.yml b/.github/workflows/openzeppelin_test_16_19.yml index 63116b9a5..bca63265f 100644 --- a/.github/workflows/openzeppelin_test_16_19.yml +++ b/.github/workflows/openzeppelin_test_16_19.yml @@ -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 diff --git a/.github/workflows/openzeppelin_test_1_5_and_12_15.yml b/.github/workflows/openzeppelin_test_1_5_and_12_15.yml index ff882c0e4..e6e09efde 100644 --- a/.github/workflows/openzeppelin_test_1_5_and_12_15.yml +++ b/.github/workflows/openzeppelin_test_1_5_and_12_15.yml @@ -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 diff --git a/.github/workflows/openzeppelin_test_6_10.yml b/.github/workflows/openzeppelin_test_6_10.yml index 2dbee05d7..a810c060e 100644 --- a/.github/workflows/openzeppelin_test_6_10.yml +++ b/.github/workflows/openzeppelin_test_6_10.yml @@ -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 diff --git a/.github/workflows/v3_core_test.yml b/.github/workflows/v3_core_test.yml index d488b3f7b..b56790adb 100644 --- a/.github/workflows/v3_core_test.yml +++ b/.github/workflows/v3_core_test.yml @@ -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: diff --git a/.github/workflows/web3_compatible.yml b/.github/workflows/web3_compatible.yml index dbb6545e8..74ae9abd1 100644 --- a/.github/workflows/web3_compatible.yml +++ b/.github/workflows/web3_compatible.yml @@ -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