aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoralexandreFre <51956137+alexandreFre@users.noreply.github.com>2019-07-05 10:07:21 +0200
committerGitHub <noreply@github.com>2019-07-05 10:07:21 +0200
commit35d1f8deb10896fc2635ab905922268e4cf266dc (patch)
tree308e98bf66512b843857a0403fe8bd9aa03f2eeb
parentd564d146deaa5e5c5e66a7407efce8e16933f921 (diff)
parent68936298c66845b16c718cbcfad8ae36ecd5fdfe (diff)
downloadterraform-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.yml34
-rw-r--r--go.mod6
-rw-r--r--mailgun/provider.go2
-rw-r--r--mailgun/resource_mailgun_domain.go2
-rw-r--r--mailgun/resource_mailgun_domain_test.go2
-rw-r--r--mailgun/resource_mailgun_route.go2
-rw-r--r--mailgun/resource_mailgun_route_test.go2
-rwxr-xr-xscripts/gogetcookie.sh11
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 @@
1dist: trusty
2sudo: required
3services:
4- docker
5language: go
6go:
7 - "1.12.x"
8 - "1.11.x"
9
10install:
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
17script:
18- make test
19- make vet
20- make website-test
21
22matrix:
23 fast_finish: true
24 allow_failures:
25 - go: tip
26
27cache:
28 directories:
29 - $GOPATH/src
30 - $HOME/.cache/go-build
31 - $HOME/gopath/pkg/mod
32
33env:
34 GO111MODULE=on
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..7ef2364
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,6 @@
1module github.com/fretlink/terraform-provider-mailgun
2
3require (
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
3import ( 3import (
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
9func Provider() terraform.ResourceProvider { 9func 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
3touch ~/.gitcookies 3 touch ~/.gitcookies
4chmod 0600 ~/.gitcookies 4 chmod 0600 ~/.gitcookies
5 5
6git config --global http.cookiefile ~/.gitcookies 6 git config --global http.cookiefile ~/.gitcookies
7 7
8tr , \\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__