From 970fda7a805ffeed9446bd25356ba61eb67fe137 Mon Sep 17 00:00:00 2001 From: gaorongze <38250151+sandiandian@users.noreply.github.com> Date: Wed, 26 Jul 2023 10:05:49 +0800 Subject: [PATCH] Add test in cicd pipeline (#72) Incremental pipeline works: Add icw-parallel-test to the CI pipeline. Don't run pipline while drafting pull request. Add gp_appendonly_insert_files = 0 parameter for Cloudberry tests#39 --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++-- .github/workflows/release.yml | 32 +++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73e92d18d56..54a868be7d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: cbdb pipeline on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - main @@ -15,6 +16,7 @@ permissions: contents: read jobs: build: + if: github.event.pull_request.draft == false runs-on: [self-hosted, example] steps: - uses: actions/checkout@v3 @@ -34,7 +36,7 @@ jobs: needs: build runs-on: [self-hosted, example] env: - MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=off' installcheck-world" + MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=off -c gp_appendonly_insert_files=0' installcheck-world" TEST_OS: "centos" DUMP_DB: "true" steps: @@ -60,7 +62,7 @@ jobs: needs: build runs-on: [self-hosted, example] env: - MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=on' installcheck-world" + MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=on -c gp_appendonly_insert_files=0' installcheck-world" TEST_OS: "centos" DUMP_DB: "true" steps: @@ -82,6 +84,33 @@ jobs: cd /code echo $GITHUB_RUN_ID > gpdb_src/BUILD_NUMBER gpdb_src/hd-ci/icw_cbdb.bash $FTS_MODE + icw-parallel-test: + needs: build + runs-on: [self-hosted, example] + env: + MAKE_TEST_COMMAND: "-C src/test/regress -k PGOPTIONS='-c gp_appendonly_insert_files=0' installcheck-cbdb-parallel" + TEST_OS: "centos" + DUMP_DB: "true" + steps: + - uses: actions/checkout@v3 + with: + path: "gpdb_src" + - uses: actions/download-artifact@v3 + with: + name: cbdb-variables + path: /opt/ + - uses: actions/download-artifact@v3 + with: + name: cbdb-package + path: /opt/ + - name: Run icw-parallel-test script + run: | + mkdir /code + cp -a gpdb_src/ /code + cd /code + echo $GITHUB_RUN_ID > gpdb_src/BUILD_NUMBER + gpdb_src/hd-ci/icw_cbdb.bash $FTS_MODE + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8e7c2c7457..9050ac32e01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: needs: build runs-on: [self-hosted, example] env: - MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=off' installcheck-world" + MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=off -c gp_appendonly_insert_files=0'' installcheck-world" TEST_OS: "centos" DUMP_DB: "true" BUILD_TYPE: release @@ -74,7 +74,7 @@ jobs: needs: build runs-on: [self-hosted, example] env: - MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=on' installcheck-world" + MAKE_TEST_COMMAND: "-k PGOPTIONS='-c optimizer=on -c gp_appendonly_insert_files=0' installcheck-world" TEST_OS: "centos" DUMP_DB: "true" BUILD_TYPE: release @@ -105,9 +105,35 @@ jobs: cd /code echo $GITHUB_RUN_ID > gpdb_src/BUILD_NUMBER gpdb_src/hd-ci/icw_cbdb.bash internal_fts + icw-parallel-test: + needs: build + runs-on: [self-hosted, example] + env: + MAKE_TEST_COMMAND: "-C src/test/regress -k PGOPTIONS='-c gp_appendonly_insert_files=0' installcheck-cbdb-parallel" + TEST_OS: "centos" + DUMP_DB: "true" + steps: + - uses: actions/checkout@v3 + with: + path: "gpdb_src" + - uses: actions/download-artifact@v3 + with: + name: cbdb-variables + path: /opt/ + - uses: actions/download-artifact@v3 + with: + name: cbdb-package + path: /opt/ + - name: Run icw-parallel-test script + run: | + mkdir /code + cp -a gpdb_src/ /code + cd /code + echo $GITHUB_RUN_ID > gpdb_src/BUILD_NUMBER + gpdb_src/hd-ci/icw_cbdb.bash internal_fts release: name: Upload Release Asset - needs: ["icw-orca-test","icw-test"] + needs: ["icw-orca-test","icw-test","icw-parallel-test"] runs-on: ubuntu-latest steps: - name: Create Release