Skip to content

Add nativeTest under GraalVM Native Image for all E2E related unit tests #292

Add nativeTest under GraalVM Native Image for all E2E related unit tests

Add nativeTest under GraalVM Native Image for all E2E related unit tests #292

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: NativeTest CI - GraalVM Native Image
# Only execute CI when changes involving GraalVM Reachability Metadata and nativeTest are involved. Because most Contributors don't use GraalVM CE.
on:
pull_request:
branches: [ master ]
paths:
- '.github/workflows/graalvm.yml'
- 'infra/reachability-metadata/src/**'
- 'test/native/native-image-filter/**'
- 'test/native/src/**'
concurrency:
group: graalvm-${{ 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
jobs:
nativetest:
if: github.repository == 'apache/shardingsphere'
name: GraalVM - GraalVM CE for JDK ${{ matrix.java-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
max-parallel: 20
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
java-version: [ '22.0.2' ]
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java-version }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Run test with GraalVM Tracing Agent
run: |
./mvnw -B clean install -am -pl test/e2e/operation/transaction -Pit.env.docker -DskipTests
./mvnw -PgenerateMetadata -DskipNativeTests -e clean test native:metadata-copy -Dtransaction.it.env.type=docker -Dtransaction.it.docker.mysql.version=mysql:5.7
- name: Run nativeTest with GraalVM CE for ${{ matrix.java-version }}
run: |
./mvnw -PnativeTestInShardingSphere -e clean test
- name: Run transaction on mysql:5.7
run: |
./mvnw -B clean install -am -pl test/e2e/operation/transaction -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dtransaction.it.env.type=docker -Dtransaction.it.docker.mysql.version=mysql:5.7
- name: Run transaction on postgres:12-alpine
run: |
./mvnw -B clean install -am -pl test/e2e/operation/transaction -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dtransaction.it.env.type=docker -Dtransaction.it.docker.postgresql.version=postgres:12-alpine
- name: Run pipeline on mysql:5.7
run: |
./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mysql.version=mysql:5.7
- name: Run pipeline on postgres:12-alpine
run: |
./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dpipeline.it.env.type=docker -Dpipeline.it.docker.postgresql.version=postgres:12-alpine
- name: Run pipeline on mariadb:11
run: |
./mvnw -B clean install -am -pl test/e2e/operation/pipeline -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dpipeline.it.env.type=docker -Dpipeline.it.docker.mariadb.version=mariadb:5.7
- name: Run showprocesslist on mysql:5.7
run: |
./mvnw -B clean install -am -pl test/e2e/operation/showprocesslist -Pit.env.docker -DskipTests
./mvnw -PnativeTestInShardingSphere -e clean test -Dshowprocesslist.it.env.type=docker -Dshowprocesslist.it.docker.mysql.version=mysql:5.7