From 985cb454bab8019a02fab67507a97e52f8afb89e Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 27 Nov 2024 15:35:58 +0800 Subject: [PATCH] migrate pull request workflow as well Signed-off-by: Bugen Zhao --- ci/workflows/pull-request.yml | 50 +++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index 01296b0a317c..e1c7afa7986e 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -20,25 +20,31 @@ cargo-cache: &cargo-cache - ".cargo/git" other-sql-backend: &other-sql-backend - setup: - label: [""] - endpoint: [""] - adjustments: - - with: - label: "" - endpoint: "" - skip: true # hack - - with: - label: "postgres" - # PGPASSWORD=postgres psql -h db -p 5432 -U postgres -d rwmeta - endpoint: "postgres://postgres:postgres@db:5432/rwmeta" - - with: - label: "mysql" - # mysql -h mysql -P 3306 -u root -p123456 -D rwmeta - endpoint: "mysql://root:123456@mysql:3306/rwmeta" - -sql-backend-env: &sql-backend-env - - "RISEDEV_SQL_ENDPOINT={{matrix.endpoint}}" + matrix: + setup: + label: [""] + endpoint: [""] + adjustments: + - with: + label: "" + endpoint: "" + skip: true # hack + - with: + label: "postgres" + # PGPASSWORD=postgres psql -h db -p 5432 -U postgres -d rwmeta + endpoint: "postgres://postgres:postgres@db:5432/rwmeta" + - with: + label: "mysql" + # mysql -h mysql -P 3306 -u root -p123456 -D rwmeta + endpoint: "mysql://root:123456@mysql:3306/rwmeta" + env: + RISEDEV_SQL_ENDPOINT: "{{matrix.endpoint}}" + +docker-compose-common: &docker-compose-common + config: ci/docker-compose.yml + mount-buildkite-agent: true + propagate-environment: true + run: rw-build-env steps: - label: "check ci image rebuild" @@ -811,7 +817,7 @@ steps: retry: *auto-retry - label: "end-to-end test ({{matrix.label}} backend)" - matrix: *other-sql-backend + <<: *other-sql-backend command: "ci/scripts/e2e-test.sh -p ci-dev -m ci-3streaming-2serving-3fe" if: build.pull_request.labels includes "ci/run-e2e-test-other-backends" || build.env("CI_STEPS") =~ /(^|,)e2e-test-other-backends?(,|$$)/ depends_on: @@ -820,10 +826,8 @@ steps: - "docslt" plugins: - docker-compose#v5.1.0: + <<: *docker-compose-common run: pg-mysql-backend-test-env - config: ci/docker-compose.yml - mount-buildkite-agent: true - env: *sql-backend-env - ./ci/plugins/upload-failure-logs timeout_in_minutes: 32 retry: *auto-retry