forked from pingcap/parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
46 lines (45 loc) · 1.32 KB
/
circle.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
version: 2
jobs:
build-ut:
docker:
- image: golang:1.13
working_directory: /go/src/github.com/pingcap/parser
steps:
- checkout
- run:
name: "Verify parser.go is up-to-date"
command: |
mv parser.go parser.go.committed
make parser
diff -u parser.go.committed parser.go
- run:
name: "Check code format"
command: make fmt
- run:
name: "Build & Test"
command: make test
- run:
name: "Upload coverage"
command: bash <(curl -s https://codecov.io/bash)
build-integration:
docker:
- image: golang:1.13
working_directory: /go/src/github.com/pingcap/parser
steps:
- checkout
- run:
name: "Integration Test"
command: |
cd /go/src/github.com/pingcap/
git clone [email protected]:pingcap/tidb.git
cd tidb
rm go.sum
GO111MODULE=on go mod edit -replace github.com/pingcap/parser=github.com/${CIRCLE_PR_USERNAME:-$CIRCLE_PROJECT_USERNAME}/${CIRCLE_PR_REPONAME:-$CIRCLE_PROJECT_REPONAME}@$CIRCLE_SHA1
# use only 1 thread to minimize memory usage (we've only got 2 CPU + 4 GB on Circle CI).
make gotest P=1
workflows:
version: 2
build_and_test:
jobs:
- build-ut
- build-integration