|
| 1 | +name: "Dubbo3 Router Test" |
| 2 | +description: "Auto test for dubbo3.x route for plugin sermant-router" |
| 3 | +runs: |
| 4 | + using: "composite" |
| 5 | + steps: |
| 6 | + - name: entry |
| 7 | + uses: ./.github/actions/common/entry |
| 8 | + with: |
| 9 | + log-dir: ./logs/dubbo3-router |
| 10 | + - name: package dubbo 3.0.x tests |
| 11 | + shell: bash |
| 12 | + if: matrix.dubbo-version == '3-0' |
| 13 | + run: mvn package -Ddubbo.version=3.0.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml |
| 14 | + - name: package dubbo 3.1.x tests |
| 15 | + shell: bash |
| 16 | + if: matrix.dubbo-version == '3-1' |
| 17 | + run: mvn package -Ddubbo.version=3.1.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml |
| 18 | + - name: package dubbo 3.2.x tests |
| 19 | + shell: bash |
| 20 | + if: matrix.dubbo-version == '3-2' |
| 21 | + run: mvn package -Ddubbo.version=3.2.${{ matrix.dubbo-versions }} -DskipTests --file sermant-integration-tests/dubbo-test/pom.xml |
| 22 | + - name: post config to local-cse |
| 23 | + shell: bash |
| 24 | + env: |
| 25 | + TEST_TYPE: router-config |
| 26 | + run: mvn test --file sermant-integration-tests/dubbo-test/pom.xml |
| 27 | + - name: echo registry model |
| 28 | + shell: bash |
| 29 | + run: | |
| 30 | + echo "=======registry-model======"-${{ matrix.registry-model }} |
| 31 | + - name: remove flowcontrol for dubbo3 |
| 32 | + # flowcontrol plugin not support dubbo3. |
| 33 | + shell: bash |
| 34 | + run: | |
| 35 | + mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar.dubbo3 |
| 36 | + mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar.dubbo3 |
| 37 | + ls sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin |
| 38 | + - name: start dubbo3 provider service |
| 39 | + shell: bash |
| 40 | + env: |
| 41 | + dynamic.config.dynamicConfigType: KIE |
| 42 | + dynamic.config.serverAddress: 127.0.0.1:30110 |
| 43 | + SERVICE_META_ENVIRONMENT: development |
| 44 | + ROUTER_PLUGIN_USE_REQUEST_ROUTER: false |
| 45 | + SERVICE_META_VERSION: 1.0.0 |
| 46 | + SERVICE_META_ZONE: az1 |
| 47 | + SERVER_PORT: 18021 |
| 48 | + DUBBO_PROTOCOL_PORT: 18821 |
| 49 | + DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }} |
| 50 | + run: | |
| 51 | + nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \ |
| 52 | + sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider.log 2>&1 & |
| 53 | + - name: start second dubbo3 provider service |
| 54 | + shell: bash |
| 55 | + env: |
| 56 | + dynamic.config.dynamicConfigType: KIE |
| 57 | + dynamic.config.serverAddress: 127.0.0.1:30110 |
| 58 | + SERVICE_META_ENVIRONMENT: development |
| 59 | + ROUTER_PLUGIN_USE_REQUEST_ROUTER: false |
| 60 | + SERVICE_META_PARAMETERS: group-test:gray |
| 61 | + SERVICE_META_ZONE: az1 |
| 62 | + SERVICE_META_VERSION: 1.0.1 |
| 63 | + SERVER_PORT: 38022 |
| 64 | + DUBBO_PROTOCOL_PORT: 18822 |
| 65 | + DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }} |
| 66 | + run: | |
| 67 | + nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \ |
| 68 | + sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider2.log 2>&1 & |
| 69 | + - name: start third dubbo3 provider service |
| 70 | + shell: bash |
| 71 | + env: |
| 72 | + dynamic.config.dynamicConfigType: KIE |
| 73 | + dynamic.config.serverAddress: 127.0.0.1:30110 |
| 74 | + SERVICE_META_ENVIRONMENT: development |
| 75 | + ROUTER_PLUGIN_USE_REQUEST_ROUTER: false |
| 76 | + SERVICE_META_PARAMETERS: group-test:red |
| 77 | + SERVICE_META_ZONE: az2 |
| 78 | + SERVICE_META_VERSION: 1.0.1 |
| 79 | + SERVER_PORT: 48023 |
| 80 | + DUBBO_PROTOCOL_PORT: 18823 |
| 81 | + DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }} |
| 82 | + run: | |
| 83 | + nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-provider -jar \ |
| 84 | + sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-provider/target/dubbo-integration-provider.jar > ${{ env.logDir }}/dubbo-zk-provider3.log 2>&1 & |
| 85 | + - name: waiting for dubbo3 provider start |
| 86 | + shell: bash |
| 87 | + run: | |
| 88 | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:18021/actuator/health 120 |
| 89 | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:38022/actuator/health 120 |
| 90 | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:48023/actuator/health 120 |
| 91 | + - name: start dubbo3 consumer service |
| 92 | + shell: bash |
| 93 | + env: |
| 94 | + dynamic.config.dynamicConfigType: KIE |
| 95 | + dynamic.config.serverAddress: 127.0.0.1:30110 |
| 96 | + SERVICE_META_ENVIRONMENT: development |
| 97 | + ROUTER_PLUGIN_USE_REQUEST_ROUTER: false |
| 98 | + SERVICE_META_PARAMETERS: group-test:gray |
| 99 | + SERVICE_META_ZONE: az1 |
| 100 | + SERVER_PORT: 28020 |
| 101 | + DUBBO_PROTOCOL_PORT: 18020 |
| 102 | + DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }} |
| 103 | + run: | |
| 104 | + nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-consumer -jar \ |
| 105 | + sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-consumer/target/dubbo-integration-consumer.jar > ${{ env.logDir }}/zookeeper-consumer.log 2>&1 & |
| 106 | + - name: waiting for dubbo3 consumer start |
| 107 | + shell: bash |
| 108 | + run: | |
| 109 | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:28020/actuator/health 120 |
| 110 | + - name: start controller service |
| 111 | + shell: bash |
| 112 | + env: |
| 113 | + dynamic.config.dynamicConfigType: KIE |
| 114 | + dynamic.config.serverAddress: 127.0.0.1:30110 |
| 115 | + SERVICE_META_ENVIRONMENT: development |
| 116 | + ROUTER_PLUGIN_USE_REQUEST_ROUTER: false |
| 117 | + DUBBO_REGISTRY_MODE: ${{ matrix.registry-model }} |
| 118 | + run: | |
| 119 | + nohup java -javaagent:sermant-agent-${{ env.sermantVersion }}/agent/sermant-agent.jar=appName=dubbo-integration-controller -jar \ |
| 120 | + sermant-integration-tests/dubbo-test/dubbo-${{ env.projectPath }}-integration-controller/target/dubbo-integration-controller.jar > ${{ env.logDir }}/cse-controller.log 2>&1 & |
| 121 | + - name: waiting for controller start |
| 122 | + shell: bash |
| 123 | + run: | |
| 124 | + bash ./sermant-integration-tests/scripts/checkService.sh http://127.0.0.1:28019/actuator/health 120 |
| 125 | + - name: Sleep for 20 Seconds |
| 126 | + shell: bash |
| 127 | + run: sleep 20 |
| 128 | + - name: restore flowcontrol for dubbo3 |
| 129 | + # flowcontrol plugin not support dubbo3. |
| 130 | + shell: bash |
| 131 | + run: | |
| 132 | + mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar.dubbo3 sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin/flowcontrol-plugin-${{ env.sermantVersion }}.jar |
| 133 | + mv sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar.dubbo3 sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/service/flowcontrol-service-${{ env.sermantVersion }}.jar |
| 134 | + ls sermant-agent-${{ env.sermantVersion }}/agent/pluginPackage/flowcontrol/plugin |
| 135 | + - name: integration test dubbo3 |
| 136 | + shell: bash |
| 137 | + env: |
| 138 | + TEST_TYPE: router |
| 139 | + run: mvn -Dexecute.spring.test=false test --file sermant-integration-tests/dubbo-test/pom.xml |
| 140 | + - name: exit |
| 141 | + if: always() |
| 142 | + uses: ./.github/actions/common/exit |
| 143 | + with: |
| 144 | + processor-keyword: dubbo |
| 145 | + - name: if failure then upload error log |
| 146 | + uses: actions/upload-artifact@v3 |
| 147 | + if: ${{ failure() || cancelled() }} |
| 148 | + with: |
| 149 | + name: (test-for-dubbo3-router)-(${{ matrix.dubbo-version }}-${{ matrix.dubbo-versions }})-logs |
| 150 | + path: | |
| 151 | + ./*.log |
| 152 | + ./logs/**/*.log |
| 153 | + if-no-files-found: warn |
| 154 | + retention-days: 2 |
0 commit comments