authelia/cmd/authelia-scripts/cmd_unittest.go
Amir Zarrinkafsh 2fb20882d9
Utilise Buildkite for Authelia CI/CD (#507)
Publish steps are currently disabled.
2019-12-27 22:07:53 +11:00

24 lines
521 B
Go

package main
import (
"github.com/authelia/authelia/internal/utils"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"os"
)
// RunUnitTest run the unit tests
func RunUnitTest(cobraCmd *cobra.Command, args []string) {
log.SetLevel(log.TraceLevel)
if err := utils.Shell("go test $(go list ./... | grep -v suites)").Run(); err != nil {
log.Fatal(err)
}
cmd := utils.Shell("yarn test")
cmd.Dir = "web"
cmd.Env = append(os.Environ(), "CI=true")
if err := cmd.Run(); err != nil {
log.Fatal(err)
}
}