Skip to content

Commit

Permalink
Merge 96d7ae4 into cab2958
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Aug 20, 2020
2 parents cab2958 + 96d7ae4 commit d004ccb
Show file tree
Hide file tree
Showing 19 changed files with 325 additions and 137 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ _testmain.go
# This project's binaries
build/
dist/

# Vagrant
.vagrant/
.release.yml.tmp
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
sudo: required
language: go
services:
- docker
go:
- 1.13

before_script:
- wget https://releases.hashicorp.com/consul/1.4.0/consul_1.4.0_linux_amd64.zip
- unzip consul_1.4.0_linux_amd64.zip
- export PATH=$PATH:$PWD
- wget https://releases.hashicorp.com/consul/1.8.3/consul_1.8.3_linux_amd64.zip
- unzip consul_1.8.3_linux_amd64.zip
- export PATH=$PWD:$PATH

script:
- make all
- make goveralls

before_deploy:
- pip install --user release-manager==0.1.0
- sudo pip install pyOpenSSL==16.2.0
- pip install --user release-manager==0.4.1

deploy:
skip_cleanup: true
Expand Down
23 changes: 11 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ $(merge_log): $(go_gen_files) $(go_src_files) $(go_test_files)
cp $(go_src_files) $(merge_src_dir)
cp $(go_test_files) $(merge_src_dir)

go get -u -t ./$(merge_src_dir)
GO111MODULE=on go get -t ./$(merge_src_dir)

@echo Source merged at: `/bin/date "+%Y-%m-%d---%H-%M-%S"` >> $(merge_log);

$(build_log): $(merge_log)
go get -u github.com/mitchellh/gox/...
GO111MODULE=on go get github.com/mitchellh/gox
gox -osarch=linux/amd64 -output=$(bin_linux) ./$(merge_src_dir)
gox -osarch=darwin/amd64 -output=$(bin_darwin) ./$(merge_src_dir)
go get github.com/konsorten/go-windows-terminal-sequences || true
GO111MODULE=on go get github.com/konsorten/go-windows-terminal-sequences || true
gox -osarch=windows/amd64 -output=$(bin_windows) ./$(merge_src_dir)

@echo Build success at: `/bin/date "+%Y-%m-%d---%H-%M-%S"` >> $(build_log);
Expand All @@ -84,11 +84,11 @@ $(build_log): $(merge_log)
# -----------------------------------------------------------------------------

format:
go fmt ./$(src_dir)
GO111MODULE=on go fmt ./$(src_dir)
gofmt -s -w ./$(src_dir)

lint:
go get -u github.com/golang/lint/golint
GO111MODULE=on go get -u golang.org/x/lint/golint
golint ./$(src_dir)

# -----------------------------------------------------------------------------
Expand All @@ -97,17 +97,16 @@ lint:

test: $(merge_log)
mkdir -p $(coverage_dir)
go get -u golang.org/x/tools/cmd/cover/...
go test ./$(merge_src_dir) -tags test -v -covermode=count -coverprofile=$(coverage_out)
GO111MODULE=on go test -parallel=1 ./$(merge_src_dir) -tags test -v -covermode=count -coverprofile=$(coverage_out)

grep -v 'data_generated.go\|schema_generated.go' $(coverage_out) > $(coverage_out)2
mv $(coverage_out)2 $(coverage_out)
sed -i 's/github.com\/snowplow\/dataflow-runner\/build/github.com\/snowplow\/dataflow-runner/g' $(coverage_out)

go tool cover -html=$(coverage_out) -o $(coverage_html)
GO111MODULE=on go tool cover -html=$(coverage_out) -o $(coverage_html)

goveralls: test
go get -u github.com/mattn/goveralls/...
GO111MODULE=on go get -u github.com/mattn/goveralls/...
goveralls -coverprofile=$(coverage_out) -service=travis-ci

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -151,10 +150,10 @@ $(depend_log): $(cluster_avsc) $(playbook_avsc)

wget -N $(codegen_link) -O $(codegen)

go get -u github.com/elodina/go-avro/...
go run $(codegen) --schema $(cluster_avsc) --schema $(playbook_avsc) --out $(generated_schema)
GO111MODULE=on go get -u github.com/elodina/go-avro/...
GO111MODULE=on go run $(codegen) --schema $(cluster_avsc) --schema $(playbook_avsc) --out $(generated_schema)

go get -u github.com/go-bindata/go-bindata/...
GO111MODULE=on go get -u github.com/go-bindata/go-bindata/...
go-bindata -o $(generated_data) $(avro_dir)

@echo Dependencies generated at: `/bin/date "+%Y-%m-%d---%H-%M-%S"` >> $(depend_log);
Expand Down
28 changes: 0 additions & 28 deletions Vagrantfile

This file was deleted.

31 changes: 31 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module github.com/snowplow/dataflow-runner

go 1.13

require (
github.com/armon/go-metrics v0.3.4 // indirect
github.com/aws/aws-sdk-go v1.34.5
github.com/elodina/go-avro v0.0.0-20160406082632-0c8185d9a3ba
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/hashicorp/consul/api v1.4.0
github.com/hashicorp/consul/sdk v0.4.0
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/go-hclog v0.14.1 // indirect
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.2.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/serf v0.9.4 // indirect
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/gox v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.6.1
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/sys v0.0.0-20200817085935-3ff754bf58a9 // indirect
golang.org/x/tools v0.0.0-20200817023811-d00afeaade8f // indirect
gopkg.in/urfave/cli.v1 v1.20.0
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
Loading

0 comments on commit d004ccb

Please sign in to comment.