Skip to content

Replace openGauss docker image: default sql_compatibility use PostgreSQL #15474

Replace openGauss docker image: default sql_compatibility use PostgreSQL

Replace openGauss docker image: default sql_compatibility use PostgreSQL #15474

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 ]
workflow_dispatch:
concurrency:
group: e2e-${{ 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 -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@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
token: ${{ github.token }}
filters: .github/workflows/resources/filter/operation-filters.yml
outputs:
changed_operations: ${{ steps.filter.outputs.changes }}
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.outputs.changed_operations != '["ignore"]'
needs: [ detect-changed-files, global-environment ]
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
max-parallel: 15
fail-fast: false
matrix:
operation: [ transaction, pipeline, showprocesslist ]
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: "enmotech/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: "enmotech/opengauss:3.1.0" }
steps:
- env:
changed_operations: ${{ needs.detect-changed-files.outputs.changed_operations }}
current_operation: ${{ matrix.operation }}
name: Check if ${{ matrix.operation }} is Changed
run: |
echo "skip_current_step=false" >> $GITHUB_ENV
if [[ ${changed_operations} == '["ignore"]' ]]; then
echo "${current_operation} is ignored by ignore filter"
echo "skip_current_step=true" >> $GITHUB_ENV
fi
if [[ ${changed_operations} == *""$current_operation""* ]]; then
echo "${current_operation} is detected by changed filter"
else
echo "${current_operation} is ignore by filter"
echo "skip_current_step=true" >> $GITHUB_ENV
fi
- name: Checkout Project
if: (env.skip_current_step == 'false')
uses: actions/checkout@v6.0.1
- if: (env.skip_current_step == 'false')
uses: actions/setup-java@v5.1.0
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Build ${{ matrix.operation }} E2E Image
if: (env.skip_current_step == 'false')
run: ./mvnw -B clean install -am -pl test/e2e/operation/${{ matrix.operation }} -Pe2e.env.docker -DskipTests
- name: Run ${{ matrix.operation }} on ${{ matrix.image.version }}
if: (env.skip_current_step == 'false')
run: ./mvnw -nsu -B install -f test/e2e/operation/${{ matrix.operation }}/pom.xml -De2e.run.type=docker -D${{ matrix.image.type }}=${{ matrix.image.version }}