-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
87 lines (76 loc) · 4.09 KB
/
.travis.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
language: go
go:
- "1.8"
- "1.9"
- "1.10"
- master
matrix:
# It's ok if our code fails on unstable development versions of Go.
allow_failures:
- go: master
# Don't wait for tip tests to finish. Mark the test run green if the
# tests pass on the stable versions of Go.
fast_finish: true
# Don't email me the results of the test runs.
notifications:
email: false
env:
# This is the version of github.com/golang/dep to use.
- DEP_VERSION="0.4.1"
before_install:
# Download the binary to bin folder in $GOPATH
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
# Make the binary executable
- chmod +x $GOPATH/bin/dep
install:
- dep ensure
# Anything in before_script that returns a nonzero exit code will
# flunk the build and immediately stop. It's sorta like having
# set -e enabled in bash.
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
# - go get github.com/golang/lint/golint # Linter
# - go get honnef.co/go/tools/cmd/megacheck # Badass static analyzer/linter
# - go get github.com/fzipp/gocyclo
# script always run to completion (set +e). All of these code checks are must haves
# in a modern Go project.
script:
- go build -o jivan main.go
- go build -tags awslambda -o jivan-lambda main.go
# Not sure why, but aws seems to insist on prepending "index." to the lambda handler name
- go test -v ./...
# - test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
# - go test -v -race ./... # Run all the tests with the race detector enabled
# - go vet ./... # go vet is the official Go static analyzer
# - megacheck ./... # "go vet on steroids" + linter
# - gocyclo -over 19 $GO_FILES # forbid code with huge functions
# - golint -set_exit_status $(go list ./...) # one last linte
deploy:
- provider: releases
api_key:
secure: K3wdPRVqCKclA046izmzCWbkgSn+/UgPAdhGhsOXYGm3nycphWF1sh1sAwx/hyUNLG/uA72kEvWMwZsXjbF+Y5nILUCThPTHn82rREiRFMSOhIWOyZKIzrgWa0EFlN7Pap0bcVwLYh8HB6iI2HB3tEnA78FtSVTB0PiE7RJLKzqOcQGqhxhB+TmcgMVpZO/0Zu2Xnwb55tL3CQytdj+qpVmJdGqxCT/YmZVjtYdYZ2cKi23/Ut++F4xKjR1FHhaG2VtU1h5gAI0N7ox/dtzuCvBlXlWc/BdYXhYAwG0Lkiybj5IKA1dUdx3SeJPCSyI107Q6jpFRFsWlo0FyqpQFqnO2XLVCn74VCgJWdpfwgIWxN0lfWjnEhB86b9xuae3iuAJPOnHmAxbs9NY0fwkjyRtHCY8DURRXhWiw1wk869XDYiavOeshY29UIaGHULQO16vXXZjWxxHHA32HCrrOggkAzshOKqAtZTE0wWq2zqJJFFAIiAdMNpLK51Nir7ZKfepjgy+y1f8YrVfm7jQlIHKZPBtcB466A8NZeBnvQLsM68a4HJtwW2QVHbju9edSD7U1NLluTqU8R1WZvLzJJ12ITQTLRCcInIy0wyodHDm37Cw2kRgNam41XjNG1O/exw/x4t18PlYdgW43umPecQu8zuTOFNjWP6m3yixuwFs=
file:
- jivan
- jivan-lambda
skip_cleanup: true
on:
tags: true
- provider: lambda
function_name: wfs3-features
role: "arn:aws:iam::126941952274:role/wfs3_lambda_deploy"
runtime: "go1.x"
region: "us-east-1"
# Weird tweak to get a valid path to root-level executable. AWS joins module_name & handler_name with a '.'
module_name: "./"
handler_name: "/jivan-lambda"
# This is the access key for IAM user "wfs3-features-deploy"
access_key_id: "AKIAJAKF2C4LV4PWUMUQ"
secret_access_key:
secure: xBJSf38Fr5TxUfadxhhjO9u7wFVA131kf11v+BVcYT5ks+pm6YaAbflD/xSi/Rc+9KMKIiHy2598MegKZZnDbYOp7bJDK55LN4DsN0hQsk32ht3ebEOKu75AIl8/sSvLVDCh0cWbjrguQyh+wntEPPn3t45VnwBehEd8W/k4iV+3nPeqN9TNwFfjkqomIpZRKhs9Uqttvpb3Mhq5EFrje3X8G+cOj1egzpdlRlXQgKH2YIMs94t7NCXF/ntT8RAQjob1IdLf6i1N6DDUipXNROz64WqmWrzmK3CzbRSd9IBtTQ+pvfjGbwet8rQ9nuZdrJND1b+QBqq2WC2Xl82Q9bFjrmM7Z1gkW65tiFQ0tX4YOOT1w1Ws6aR+lRjd37pipGyKubQD9NaTxPZCtRrhCo7K1ROVArqsBdpkWgm7GsCElX0BFCjk/xI4kE0l+Ve3iG6+JmkCzabRAKq2EhM09rDmjRxWZ/MGVzNjOojaxkaxyxf1lYqTIMJn9zyCVmXnTrDSZgCERdoMeEiDcQlzRu/T+kM5n5fL1gbpoKxwTVeiYn3SJfE9BWXFbs1024wKpejy7X6k3UOoZUdq2XWeoXPq/sB2grco3p5NuS4O00nLMto8m5EBH4DcRyFa2W8d3qXNQbbe4lPN0OxzwwcTMh2MBtxfpm7K68tCBLEGkPA=
file:
- jivan-lambda
- test_data/athens-osm-20170921.gpkg
skip_cleanup: true
on:
tags: true
# Kick-03