From 8f0686e0768549116f899e916e4bec364cd3cb5e Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Fri, 2 Mar 2018 16:38:19 -0800 Subject: [PATCH] Adding travis CI config (#28) * Adding travis CI config * not using the make target * Fixing a bug Hooray CI! --- .travis.yml | 7 +++++++ actions/all.go | 18 ------------------ actions/app.go | 1 - 3 files changed, 7 insertions(+), 19 deletions(-) create mode 100644 .travis.yml delete mode 100644 actions/all.go diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..f6a50c9e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: go +install: false +go: + - "1.8" + - "1.9" + - "1.10.x" +script: go test ./... diff --git a/actions/all.go b/actions/all.go deleted file mode 100644 index 42d27e26..00000000 --- a/actions/all.go +++ /dev/null @@ -1,18 +0,0 @@ -package actions - -import ( - "net/http" - - "github.com/gobuffalo/buffalo" - "github.com/gomods/athens/pkg/storage" -) - -func allHandler(lister storage.Lister) func(buffalo.Context) error { - return func(c buffalo.Context) error { - revInfos, err := lister.All() - if err != nil { - return err - } - return c.Render(http.StatusOK, r.JSON(&revInfos)) - } -} diff --git a/actions/app.go b/actions/app.go index 4d200fc4..fc49d876 100644 --- a/actions/app.go +++ b/actions/app.go @@ -85,7 +85,6 @@ func App() *buffalo.App { app.Use(GoGet()) app.GET("/", homeHandler) - app.GET("/all", allHandler(storageReader)) app.GET("/{base_url:.+}/{module}/@v/list", listHandler(storageReader)) app.GET("/{base_url:.+}/{module}/@v/{version}.info", versionInfoHandler(storageReader)) app.GET("/{base_url:.+}/{module}/@v/{version}.mod", versionModuleHandler(storageReader))