Adding travis CI config (#28)

* Adding travis CI config

* not using the make target

* Fixing a bug

Hooray CI!
This commit is contained in:
Aaron Schlesinger
2018-03-02 16:38:19 -08:00
committed by Brian Ketelsen
parent c0749c3725
commit 8f0686e076
3 changed files with 7 additions and 19 deletions
+7
View File
@@ -0,0 +1,7 @@
language: go
install: false
go:
- "1.8"
- "1.9"
- "1.10.x"
script: go test ./...
-18
View File
@@ -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))
}
}
-1
View File
@@ -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))