Skip to content

Initial version for shardingsphere-mcp #16892

Initial version for shardingsphere-mcp

Initial version for shardingsphere-mcp #16892

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: E2E - Operation
on:
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
workflow_dispatch:
concurrency:
group: e2e-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dspotless.apply.skip=true -Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
jobs:
global-environment:
name: Import Global Environment
uses: ./.github/workflows/required-reusable.yml
detect-changed-files:
name: Detect Changed Files
if: github.repository == 'apache/shardingsphere'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6.0.1
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d
id: filter
with:
token: ${{ github.token }}
filters: .github/workflows/resources/filter/operation-filters.yml
outputs:
changed_operations: ${{ steps.filter.outputs.changes }}
prepare-e2e-artifacts:
name: Prepare E2E Artifacts
if: github.repository == 'apache/shardingsphere' && needs.detect-changed-files.outputs.changed_operations != '[]'
needs: [ global-environment, detect-changed-files ]
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v6.0.1
- id: setup-build-environment
uses: ./.github/workflows/resources/actions/setup-build-environment
with:
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- name: Maven Install
env:
PREFIX: "test/e2e/operation/"
MODULE_LIST: "transaction,pipeline,showprocesslist"
run: |
FORMATTED_PL=$(echo "$MODULE_LIST" | sed "s|,|,$PREFIX|g" | sed "s|^|$PREFIX|")
echo "Ready to build: $FORMATTED_PL"
./mvnw -B clean install -am -pl "$FORMATTED_PL" -Pe2e.env.docker -DskipTests
- uses: ./.github/workflows/resources/actions/save-maven-cache
with:
cache-hit: ${{ steps.setup-build-environment.outputs.cache-hit }}
cache-primary-key: ${{ steps.setup-build-environment.outputs.cache-primary-key }}
- uses: ./.github/workflows/resources/actions/upload-source-snapshot
- uses: ./.github/workflows/resources/actions/upload-e2e-artifacts
e2e-operation:
name: E2E - ${{ matrix.operation }} on ${{ matrix.image.version }}
if: github.repository == 'apache/shardingsphere' && needs.detect-changed-files.outputs.changed_operations != '[]'
needs: [ detect-changed-files, global-environment, prepare-e2e-artifacts ]
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
max-parallel: 15
fail-fast: false
matrix:
operation: ${{ fromJSON(needs.detect-changed-files.outputs.changed_operations) }}
image: [
{ type: "e2e.docker.database.mysql.images", version: "mysql:5.7" },
{ type: "e2e.docker.database.mariadb.images", version: "mariadb:11" },
{ type: "e2e.docker.database.postgresql.images", version: "postgres:12-alpine" },
{ type: "e2e.docker.database.opengauss.images", version: "opengauss/opengauss:3.1.0" }
]
exclude:
- operation: transaction
image: { type: "e2e.docker.database.mariadb.images", version: "mariadb:11" }
- operation: showprocesslist
image: { type: "e2e.docker.database.mariadb.images", version: "mariadb:11" }
- operation: showprocesslist
image: { type: "e2e.docker.database.postgresql.images", version: "postgres:12-alpine" }
- operation: showprocesslist
image: { type: "e2e.docker.database.opengauss.images", version: "opengauss/opengauss:3.1.0" }
steps:
- name: Logs
run: |
echo "runner.temp=${{ runner.temp }}"
echo "RUNNER_TEMP=$RUNNER_TEMP"
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
- name: Download Source Snapshot
uses: actions/download-artifact@v8
with:
name: source-snapshot
path: ${{ runner.temp }}/source-snapshot
- name: Restore Source Snapshot
run: |
find "$GITHUB_WORKSPACE" -mindepth 1 -delete 2>/dev/null || true
tar -xzf "$RUNNER_TEMP/source-snapshot/source-snapshot.tar.gz" -C "$GITHUB_WORKSPACE"
- uses: ./.github/workflows/resources/actions/setup-build-environment
with:
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- uses: ./.github/workflows/resources/actions/download-e2e-artifacts
- name: Run ${{ matrix.operation }} on ${{ matrix.image.version }}
run: ./mvnw -nsu -B install -f test/e2e/operation/${{ matrix.operation }}/pom.xml -De2e.run.type=docker -D${{ matrix.image.type }}=${{ matrix.image.version }}