Skip to content

Improve "show migration check status" #1905

Improve "show migration check status"

Improve "show migration check status" #1905

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:
push:
branches: [ dev ]
pull_request:
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
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
token: ${{ github.token }}
filters: .github/workflows/resources/filter/filters.yml
outputs:
changed_operations: ${{ steps.filter.outputs.changes }}
e2e-operation:
if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
name: E2E - Operation
needs: [ detect-changed-files, global-environment ]
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
max-parallel: 20
fail-fast: false
matrix:
operation: [ transaction, pipeline, showprocesslist ]
image: [ { type: "it.docker.mysql.version", version: "mysql:5.7" }, { type: "it.docker.postgresql.version", version: "postgres:12-alpine" }, { type: "it.docker.opengauss.version", version: "enmotech/opengauss:2.1.0" } ]
exclude:
- operation: showprocesslist
image: { type: "it.docker.postgresql.version", version: "postgres:12-alpine" }
- operation: showprocesslist
image: { type: "it.docker.opengauss.version", version: "enmotech/opengauss:2.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@v3
- name: Retrieve Maven Caches
if: (env.skip_current_step == 'false')
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-e2e-cache-
${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- if: (env.skip_current_step == 'false')
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Build ${{ matrix.operation }} E2E Image
if: (env.skip_current_step == 'false')
run: ./mvnw -B clean install -am -pl test/e2e/operation/${{ matrix.operation }} -Pit.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 -D${{ matrix.operation }}.it.env.type=docker -D${{ matrix.operation }}.${{ matrix.image.type }}=${{ matrix.image.version }}