-
Notifications
You must be signed in to change notification settings - Fork 244
69 lines (65 loc) · 1.9 KB
/
verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# this workflow contains fmt,build,ut fot tikv-client
name: verify
on:
push:
branches: [ master ]
pull_request:
branches: [ master,release-** ]
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