-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
42 lines (34 loc) · 923 Bytes
/
main.go
File metadata and controls
42 lines (34 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"os"
"github.com/Lord-Y/cypress-parallel-cli/cmd"
"github.com/Lord-Y/cypress-parallel-cli/logger"
"github.com/rs/zerolog/log"
cli "github.com/urfave/cli/v2"
)
// make vars public for unit testing
var (
cypress *cli.Command
versionDetails *cli.Command
)
func init() {
logger.SetLoggerLogLevel()
cypress = cmd.Cypress(&cli.Context{})
versionDetails = cmd.VersionDetails(&cli.Context{})
}
func main() {
app := cli.NewApp()
app.Name = "cypress-parallel-cli"
app.Usage = "A cli to start your e2e testing in parallel"
app.Description = "cypress-parallel-cli enable user to reduce their e2e testing execution thanks to parallelization"
app.Version = cmd.Version
app.EnableBashCompletion = true
app.Commands = []*cli.Command{
cypress,
versionDetails,
}
err := app.Run(os.Args)
if err != nil {
log.Fatal().Err(err).Msg("Error occured while executing the program")
}
}