From 6a0da36bc56aa227d88a740130ba54b956da5c7c Mon Sep 17 00:00:00 2001 From: Haonan Date: Sun, 26 May 2024 21:31:47 +0800 Subject: [PATCH] Merge multi-language client CI workflows to one ymls (#12586) --- .github/workflows/client-go.yml | 53 ---------------- .github/workflows/client-python.yml | 58 ------------------ ...ient-cpp.yml => multi-language-client.yml} | 60 ++++++++++++++++--- 3 files changed, 52 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/client-go.yml delete mode 100644 .github/workflows/client-python.yml rename .github/workflows/{client-cpp.yml => multi-language-client.yml} (62%) diff --git a/.github/workflows/client-go.yml b/.github/workflows/client-go.yml deleted file mode 100644 index e84014dc97a1..000000000000 --- a/.github/workflows/client-go.yml +++ /dev/null @@ -1,53 +0,0 @@ -# This workflow is just for checking whether modifications works for the Go client. - -name: Go Client - -on: - push: - branches: - - master - - 'rel/*' - - "new_*" - paths-ignore: - - 'docs/**' - - 'site/**' - pull_request: - branches: - - master - - 'rel/*' - - "new_*" - paths-ignore: - - 'docs/**' - - 'site/**' - # allow manually run the action: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - -jobs: - Test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - token: ${{secrets.GITHUB_TOKEN}} - submodules: recursive - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2- - - name: Compile IoTDB Server - run: mvn clean package -pl distribution -am -DskipTests - - name: Integration test - shell: bash - run: | - cd iotdb-client/client-go/ && make e2e_test_for_parent_git_repo e2e_test_clean_for_parent_git_repo diff --git a/.github/workflows/client-python.yml b/.github/workflows/client-python.yml deleted file mode 100644 index 6f95496236fe..000000000000 --- a/.github/workflows/client-python.yml +++ /dev/null @@ -1,58 +0,0 @@ -# This workflow is just for checking whether modifications works for the Python client. - -name: Python Client - -on: - push: - branches: - - master - - 'rel/*' - paths-ignore: - - 'docs/**' - - 'site/**' - pull_request: - branches: - - master - - 'rel/*' - - "new_*" - paths-ignore: - - 'docs/**' - - 'site/**' - # allow manually run the action: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} - -jobs: - Test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Cache Maven packages - uses: actions/cache@v4 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2- - - name: Build IoTDB server distribution zip and python client - run: mvn -B clean install -pl distribution,iotdb-client/client-py -am -DskipTests - - name: Build IoTDB server docker image - run: | - docker build . -f docker/src/main/Dockerfile-1c1d -t "iotdb:dev" - docker images - - name: Install IoTDB python client requirements - run: pip3 install -r iotdb-client/client-py/requirements_dev.txt - - name: Check code style - shell: bash - run: black iotdb-client/client-py/ --check --diff - - name: Integration test - shell: bash - run: | - cd iotdb-client/client-py/ && pytest . diff --git a/.github/workflows/client-cpp.yml b/.github/workflows/multi-language-client.yml similarity index 62% rename from .github/workflows/client-cpp.yml rename to .github/workflows/multi-language-client.yml index 39dddba8bb7b..ee387cf96b72 100644 --- a/.github/workflows/client-cpp.yml +++ b/.github/workflows/multi-language-client.yml @@ -1,10 +1,4 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -# CPP compiling is too slow, so let's do it in parallel with testing other modules. -# As there is no Java client, we just use one JDK. -name: C++ Client - +name: Multi-Language Client on: push: branches: @@ -23,6 +17,7 @@ on: # allow manually run the action: workflow_dispatch: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -31,7 +26,7 @@ env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 jobs: - Test: + cpp: strategy: fail-fast: false max-parallel: 20 @@ -83,3 +78,52 @@ jobs: path: iotdb-client/client-cpp/target/build/test/Testing retention-days: 1 + go: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + token: ${{secrets.GITHUB_TOKEN}} + submodules: recursive + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2- + - name: Compile IoTDB Server + run: mvn clean package -pl distribution -am -DskipTests + - name: Integration test + shell: bash + run: | + cd iotdb-client/client-go/ && make e2e_test_for_parent_git_repo e2e_test_clean_for_parent_git_repo + + python: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2- + - name: Build IoTDB server distribution zip and python client + run: mvn -B clean install -pl distribution,iotdb-client/client-py -am -DskipTests + - name: Build IoTDB server docker image + run: | + docker build . -f docker/src/main/Dockerfile-1c1d -t "iotdb:dev" + docker images + - name: Install IoTDB python client requirements + run: pip3 install -r iotdb-client/client-py/requirements_dev.txt + - name: Check code style + shell: bash + run: black iotdb-client/client-py/ --check --diff + - name: Integration test + shell: bash + run: | + cd iotdb-client/client-py/ && pytest . + +