Skip to content

Commit

Permalink
Update travis and use go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lavoiesl committed Feb 26, 2020
1 parent 8f3f176 commit 45ae04d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 19 deletions.
26 changes: 7 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
language: go

go:
- 1.2
- 1.3
- 1.4
- 1.5
- 1.6
- 1.7
- 1.8
- 1.9
- master
- "1.13"
- tip

# safelist
branches:
only:
- master
- v2
go_import_path: github.com/Shopify/gomail

notifications:
email: false
script:
- make coverage

before_install:
- mkdir -p $GOPATH/src/gopkg.in &&
ln -s ../github.com/go-mail/mail $GOPATH/src/gopkg.in/mail.v2
after_success:
- if [[ -f "coverage.txt" ]]; then bash <(curl -s https://codecov.io/bash); fi
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
GOFILES := $(shell find . -path ./vendor -prune -o -type f -name '*.go' -print)

all: test

test:
go test ./...

coverage: coverage.txt

coverage.txt: $(GOFILES) Makefile
go test -coverprofile=coverage.txt -covermode=atomic ./...

show-coverage: coverage.txt
go tool cover -html=coverage.txt

style: $(GOFILES) Makefile .golangci.yml
bin/style

clean:
go clean
rm -f coverage.txt

.PHONY: clean test coverage show-coverage
14 changes: 14 additions & 0 deletions dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: gomail

up:
- go:
version: "1.13.7"
modules: true

commands:
test: go test -race ./...
style:
run: bin/style
desc: Static verification using golangci or autofix issues when possible.
syntax:
optional: --fix
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/Shopify/gomail

go 1.13

require (
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
gopkg.in/mail.v2 v2.3.1
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/mail.v2 v2.3.1 h1:WYFn/oANrAGP2C0dcV6/pbkPzv8yGzqTjPmTeO7qoXk=
gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=

0 comments on commit 45ae04d

Please sign in to comment.