Skip to content

Commit

Permalink
CI config (pingcap#2188)
Browse files Browse the repository at this point in the history
* ADD:add verify.yml in workflow contains fmt,build and ut

* ADD:add excludes in maven-surefire-plugin so that the integration test can be excluded with command line

* ADD:add sonatype config

* MOD:increase instanceCap and reduce resourceRequest in integration_test to improve parallelism

* MOD:remove test PartitionTableSuite for takes too much time

* MOD:mod mvn-scalafmt plugin's annotation

* Revert "MOD:mod mvn-scalafmt plugin's annotation"

This reverts commit 2ecb400.

* MOD:add integration_test's namespace and remove idleMinutes

* trigger GitHub actions

* Revert "MOD:add integration_test's namespace and remove idleMinutes"

This reverts commit 1353b3f.

* MOD:add integration_test's namespace and remove idleMinutes

* trigger github action

* MOD:mod veridy.yml,check if support  ipv6
  • Loading branch information
shiyuhang0 authored Dec 30, 2021
1 parent ebfc4b2 commit cc000b4
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .ci/integration_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ def call(ghprbActualCommit, ghprbCommentBody, ghprbPullId, ghprbPullTitle, ghprb

def label = "regression-test-tispark"

podTemplate(name: label, label: label, instanceCap: 10, idleMinutes: 10, containers: [
podTemplate(name: label, label: label, instanceCap: 20, namespace: 'jenkins-tispark' , containers: [
containerTemplate(name: 'golang', image: 'hub.pingcap.net/jenkins/centos7_golang-1.12:cached',
envVars: [
envVar(key: 'DOCKER_HOST', value: 'tcp://localhost:2375'),
], alwaysPullImage: true, ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'java', image: 'hub.pingcap.net/jenkins/centos7_golang-1.13_java:cached',
resourceRequestCpu: '8000m',
resourceRequestMemory: '16Gi',
resourceRequestCpu: '4000m',
resourceRequestMemory: '8Gi',
envVars: [
envVar(key: 'DOCKER_HOST', value: 'tcp://localhost:2375'),
], alwaysPullImage: true, ttyEnabled: true, command: 'cat'),
Expand Down Expand Up @@ -177,7 +177,7 @@ def call(ghprbActualCommit, ghprbCommentBody, ghprbPullId, ghprbPullTitle, ghprb
pwd
cp -R /home/jenkins/agent/git/tispark/. ./
git checkout -f ${ghprbActualCommit}
find core/src -name '*Suite*' | grep -v 'MultiColumnPKDataTypeSuite' > test
find core/src -name '*Suite*' | grep -v 'MultiColumnPKDataTypeSuite\\|PartitionTableSuite' > test
shuf test -o test2
mv test2 test
"""
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# this workflow contains fmt,build,ut fot tikv-client
name: verify

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: fmt
run: |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
mvn mvn-scalafmt_2.12:format -Dscalafmt.skip=false -B
mvn com.coveo:fmt-maven-plugin:format -B
git diff --quiet
formatted="$?"
if [[ "${formatted}" -eq 1 ]]
then
echo "code format error, please run the following commands:"
echo " mvn mvn-scalafmt_2.12:format -Dscalafmt.skip=false"
echo " mvn com.coveo:fmt-maven-plugin:format"
exit 1
fi
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: build
run: |
mvn clean package -Dmaven.test.skip=true -B
tikv-client-ut:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: ut
run: |
lsmod | grep -qw ipv6 && mvn test -am -pl tikv-client -DsomeModule.test.excludes="**/txn/*" -B || mvn test -am -pl tikv-client -DsomeModule.test.excludes="**/txn/*,**/PDClientTest.java" -B
14 changes: 14 additions & 0 deletions .lift.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build = "mvn"

ignoreFiles = """
assembly/**
db-random-test/**
spark-wrapper/**
tikv-client/target/**
core/target/**
**/build/**
"""

tools = [ "infer", "findsecbugs","errorprone" ]

jdk11 = false
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<test.exclude.tags/>
<test.include.tags/>
<scalaj.version>2.3.0</scalaj.version>
<someModule.test.excludes></someModule.test.excludes>
</properties>
<repositories>
<repository>
Expand Down Expand Up @@ -209,6 +210,9 @@
<parallel>suites</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
<forkMode>always</forkMode>
<excludes>
<exclude>${someModule.test.excludes}</exclude>
</excludes>
</configuration>
<version>3.0.0-M3</version>
</plugin>
Expand Down

0 comments on commit cc000b4

Please sign in to comment.