diff options
author | alexandreFre <51956137+alexandreFre@users.noreply.github.com> | 2019-07-05 10:07:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-05 10:07:21 +0200 |
commit | 35d1f8deb10896fc2635ab905922268e4cf266dc (patch) | |
tree | 308e98bf66512b843857a0403fe8bd9aa03f2eeb | |
parent | d564d146deaa5e5c5e66a7407efce8e16933f921 (diff) | |
parent | 68936298c66845b16c718cbcfad8ae36ecd5fdfe (diff) | |
download | terraform-provider-mailgun-35d1f8deb10896fc2635ab905922268e4cf266dc.tar.gz terraform-provider-mailgun-35d1f8deb10896fc2635ab905922268e4cf266dc.tar.zst terraform-provider-mailgun-35d1f8deb10896fc2635ab905922268e4cf266dc.zip |
Merge pull request #7 from alexandreFre/add_doc
Add automatic testing on Travis
-rw-r--r-- | .travis.yml | 34 | ||||
-rw-r--r-- | go.mod | 6 | ||||
-rw-r--r-- | mailgun/provider.go | 2 | ||||
-rw-r--r-- | mailgun/resource_mailgun_domain.go | 2 | ||||
-rw-r--r-- | mailgun/resource_mailgun_domain_test.go | 2 | ||||
-rw-r--r-- | mailgun/resource_mailgun_route.go | 2 | ||||
-rw-r--r-- | mailgun/resource_mailgun_route_test.go | 2 | ||||
-rwxr-xr-x | scripts/gogetcookie.sh | 11 |
8 files changed, 50 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a6b90ed --- /dev/null +++ b/.travis.yml | |||
@@ -0,0 +1,34 @@ | |||
1 | dist: trusty | ||
2 | sudo: required | ||
3 | services: | ||
4 | - docker | ||
5 | language: go | ||
6 | go: | ||
7 | - "1.12.x" | ||
8 | - "1.11.x" | ||
9 | |||
10 | install: | ||
11 | # This script is used by the Travis build to install a cookie for | ||
12 | # go.googlesource.com so rate limits are higher when using `go get` to fetch | ||
13 | # packages that live there. | ||
14 | # See: https://github.com/golang/go/issues/12933 | ||
15 | - bash scripts/gogetcookie.sh | ||
16 | |||
17 | script: | ||
18 | - make test | ||
19 | - make vet | ||
20 | - make website-test | ||
21 | |||
22 | matrix: | ||
23 | fast_finish: true | ||
24 | allow_failures: | ||
25 | - go: tip | ||
26 | |||
27 | cache: | ||
28 | directories: | ||
29 | - $GOPATH/src | ||
30 | - $HOME/.cache/go-build | ||
31 | - $HOME/gopath/pkg/mod | ||
32 | |||
33 | env: | ||
34 | GO111MODULE=on | ||
@@ -0,0 +1,6 @@ | |||
1 | module github.com/fretlink/terraform-provider-mailgun | ||
2 | |||
3 | require ( | ||
4 | github.com/hashicorp/terraform v0.12.3 | ||
5 | github.com/mailgun/mailgun-go/v3 v3.6.0 | ||
6 | ) | ||
diff --git a/mailgun/provider.go b/mailgun/provider.go index 2133777..90ea5e5 100644 --- a/mailgun/provider.go +++ b/mailgun/provider.go | |||
@@ -3,7 +3,7 @@ package mailgun | |||
3 | import ( | 3 | import ( |
4 | "github.com/hashicorp/terraform/helper/schema" | 4 | "github.com/hashicorp/terraform/helper/schema" |
5 | "github.com/hashicorp/terraform/terraform" | 5 | "github.com/hashicorp/terraform/terraform" |
6 | "github.com/mailgun/mailgun-go" | 6 | "github.com/mailgun/mailgun-go/v3" |
7 | ) | 7 | ) |
8 | 8 | ||
9 | func Provider() terraform.ResourceProvider { | 9 | func Provider() terraform.ResourceProvider { |
diff --git a/mailgun/resource_mailgun_domain.go b/mailgun/resource_mailgun_domain.go index f859230..1fcba83 100644 --- a/mailgun/resource_mailgun_domain.go +++ b/mailgun/resource_mailgun_domain.go | |||
@@ -4,7 +4,7 @@ import ( | |||
4 | "context" | 4 | "context" |
5 | "fmt" | 5 | "fmt" |
6 | "github.com/hashicorp/terraform/helper/schema" | 6 | "github.com/hashicorp/terraform/helper/schema" |
7 | "github.com/mailgun/mailgun-go" | 7 | "github.com/mailgun/mailgun-go/v3" |
8 | "log" | 8 | "log" |
9 | "time" | 9 | "time" |
10 | ) | 10 | ) |
diff --git a/mailgun/resource_mailgun_domain_test.go b/mailgun/resource_mailgun_domain_test.go index c35df48..6096c60 100644 --- a/mailgun/resource_mailgun_domain_test.go +++ b/mailgun/resource_mailgun_domain_test.go | |||
@@ -5,7 +5,7 @@ import ( | |||
5 | "fmt" | 5 | "fmt" |
6 | "github.com/hashicorp/terraform/helper/resource" | 6 | "github.com/hashicorp/terraform/helper/resource" |
7 | "github.com/hashicorp/terraform/terraform" | 7 | "github.com/hashicorp/terraform/terraform" |
8 | "github.com/mailgun/mailgun-go" | 8 | "github.com/mailgun/mailgun-go/v3" |
9 | "os" | 9 | "os" |
10 | "strconv" | 10 | "strconv" |
11 | "testing" | 11 | "testing" |
diff --git a/mailgun/resource_mailgun_route.go b/mailgun/resource_mailgun_route.go index e19b67f..cf8290f 100644 --- a/mailgun/resource_mailgun_route.go +++ b/mailgun/resource_mailgun_route.go | |||
@@ -4,7 +4,7 @@ import ( | |||
4 | "context" | 4 | "context" |
5 | "fmt" | 5 | "fmt" |
6 | "github.com/hashicorp/terraform/helper/schema" | 6 | "github.com/hashicorp/terraform/helper/schema" |
7 | "github.com/mailgun/mailgun-go" | 7 | "github.com/mailgun/mailgun-go/v3" |
8 | "log" | 8 | "log" |
9 | "time" | 9 | "time" |
10 | ) | 10 | ) |
diff --git a/mailgun/resource_mailgun_route_test.go b/mailgun/resource_mailgun_route_test.go index b3806c2..2d7b221 100644 --- a/mailgun/resource_mailgun_route_test.go +++ b/mailgun/resource_mailgun_route_test.go | |||
@@ -5,7 +5,7 @@ import ( | |||
5 | "fmt" | 5 | "fmt" |
6 | "github.com/hashicorp/terraform/helper/resource" | 6 | "github.com/hashicorp/terraform/helper/resource" |
7 | "github.com/hashicorp/terraform/terraform" | 7 | "github.com/hashicorp/terraform/terraform" |
8 | "github.com/mailgun/mailgun-go" | 8 | "github.com/mailgun/mailgun-go/v3" |
9 | "strconv" | 9 | "strconv" |
10 | "testing" | 10 | "testing" |
11 | "time" | 11 | "time" |
diff --git a/scripts/gogetcookie.sh b/scripts/gogetcookie.sh index 26c63a6..37955fc 100755 --- a/scripts/gogetcookie.sh +++ b/scripts/gogetcookie.sh | |||
@@ -1,10 +1,9 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | touch ~/.gitcookies | 3 | touch ~/.gitcookies |
4 | chmod 0600 ~/.gitcookies | 4 | chmod 0600 ~/.gitcookies |
5 | 5 | ||
6 | git config --global http.cookiefile ~/.gitcookies | 6 | git config --global http.cookiefile ~/.gitcookies |
7 | 7 | ||
8 | tr , \\t <<\__END__ >>~/.gitcookies | 8 | tr , \\t <<\__END__ >>~/.gitcookies |
9 | .googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE | 9 | .googlesource.com,TRUE,/,TRUE,2147483647,o,git-alexandre.namebla.gmail.com=1/OtfvUDYg3VAHfIxaqjAuv8MJqu6--gSU_zSkD8YkKPc |
10 | __END__ | ||