This repository was archived by the owner on Feb 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +87
-9
lines changed Expand file tree Collapse file tree 6 files changed +87
-9
lines changed Original file line number Diff line number Diff line change 1+ name : mydumper Build
2+ on : [push, pull_request]
3+ jobs :
4+
5+ build :
6+ name : Build
7+ runs-on : ubuntu-latest
8+ steps :
9+
10+ - name : Set up Go 1.13
11+ uses : actions/setup-go@v1
12+ with :
13+ go-version : 1.13
14+ id : go
15+
16+ - name : Check out code
17+ uses : actions/checkout@v2
18+
19+ - name : Build
20+ run : |
21+ export PATH=$PATH:$(go env GOPATH)/bin
22+ make build
Original file line number Diff line number Diff line change 1+ name : mydumper Coverage
2+ on : [push, pull_request]
3+ jobs :
4+
5+ coverage :
6+ name : Coverage
7+ runs-on : ubuntu-latest
8+ steps :
9+
10+ - name : Set up Go 1.13
11+ uses : actions/setup-go@v1
12+ with :
13+ go-version : 1.13
14+ id : go
15+
16+ - name : Check out code
17+ uses : actions/checkout@v2
18+
19+ - name : Coverage
20+ run : |
21+ export PATH=$PATH:$(go env GOPATH)/bin
22+ make coverage
23+ bash <(curl -s https://codecov.io/bash) -f "!mock.go" -t 139cd284-7f04-4e98-9e4b-4c697f007b59
Original file line number Diff line number Diff line change 1+ name : mydumper Test
2+ on : [push, pull_request]
3+ jobs :
4+
5+ test :
6+ name : Test
7+ runs-on : ubuntu-latest
8+ steps :
9+
10+ - name : Set up Go 1.13
11+ uses : actions/setup-go@v1
12+ with :
13+ go-version : 1.13
14+ id : go
15+
16+ - name : Check out code
17+ uses : actions/checkout@v2
18+
19+ - name : Test
20+ run : |
21+ export PATH=$PATH:$(go env GOPATH)/bin
22+ make test
Original file line number Diff line number Diff line change 1- [ ![ Build Status] ( https://travis-ci.org/xelabs/go-mydumper.png )] ( https://travis-ci.org/xelabs/go-mydumper ) [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/xelabs/go-mydumper )] ( https://goreportcard.com/report/github.com/xelabs/go-mydumper ) [ ![ codecov.io] ( https://codecov.io/gh/xelabs/go-mydumper/graphs/badge.svg )] ( https://codecov.io/gh/xelabs/go-mydumper/branch/master )
1+ [ ![ Github Actions Status] ( https://github.com/xelabs/go-mydumper/workflows/mydumper%20Build/badge.svg )] ( https://github.com/xelabs/go-mydumper/actions?query=workflow%3A%22mydumper+Build%22 )
2+ [ ![ Github Actions Status] ( https://github.com/xelabs/go-mydumper/workflows/mydumper%20Test/badge.svg )] ( https://github.com/xelabs/go-mydumper/actions?query=workflow%3A%22mydumper+Test%22 )
3+ [ ![ Github Actions Status] ( https://github.com/xelabs/go-mydumper/workflows/mydumper%20Coverage/badge.svg )] ( https://github.com/xelabs/go-mydumper/actions?query=workflow%3A%22mydumper+Coverage%22 )
4+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/xelabs/go-mydumper )] ( https://goreportcard.com/report/github.com/xelabs/go-mydumper ) [ ![ codecov.io] ( https://codecov.io/gh/xelabs/go-mydumper/graphs/badge.svg )] ( https://codecov.io/gh/xelabs/go-mydumper/branch/master )
25
36# go-mydumper
47
Original file line number Diff line number Diff line change @@ -14,17 +14,18 @@ outdir = ./dumper-sql
1414# Split tables into chunks of this output file size. This value is in MB
1515chunksize = 128
1616# Session variables, split by ;
17- vars= "xx=xx;xx=xx;"
17+ # vars= "xx=xx;xx=xx;"
18+ vars= ""
1819
1920# Use this to restrict exported data. These are optional
2021[where]
21- sample_table1 = created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
22- sample_table2 = created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
22+ # sample_table1 = created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
23+ # sample_table2 = created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
2324
2425# Use this to override value returned from tables. These are optional
2526[select]
26- user.salt = 'reset salt of all system users'
27- user.password = 'reset password of all system users'
27+ # user.salt = 'reset salt of all system users'
28+ # user.password = 'reset password of all system users'
2829
29- customer.first_name = CONCAT('Bohu', id)
30- customer.last_name = 'Last'
30+ # customer.first_name = CONCAT('Bohu', id)
31+ # customer.last_name = 'Last'
Original file line number Diff line number Diff line change 77 @echo " --> go get..."
88 go get github.com/xelabs/go-mysqlstack/driver
99 go get github.com/dlintw/goconf
10+
11+ gettest :
12+ @echo " --> go get..."
1013 go get github.com/stretchr/testify/assert
1114 go get github.com/pierrre/gotestcover
1215
2831 go vet ./...
2932
3033test :
34+ @$(MAKE ) get
35+ @$(MAKE ) gettest
3136 @echo " --> Testing..."
3237 @$(MAKE ) testcommon
3338
@@ -37,8 +42,10 @@ testcommon:
3742# code coverage
3843COVPKGS = common
3944coverage :
45+ @$(MAKE ) get
46+ @$(MAKE ) gettest
4047 go build -v -o bin/gotestcover \
4148 src/github.com/pierrre/gotestcover/* .go;
42- gotestcover -coverprofile=coverage.out -v $(COVPKGS )
49+ bin/ gotestcover -coverprofile=coverage.out -v $(COVPKGS )
4350 go tool cover -html=coverage.out
4451.PHONY : get build clean fmt test coverage
You can’t perform that action at this time.
0 commit comments