1234567891011121314151617181920212223242526272829303132 |
- package main
- import (
- "github.com/magefile/mage/sh"
- )
- var (
- Default = Build // nolint: deadcode
- packagesToMock = []string{"ifttt", "neighbors", "wrap"}
- )
- // Generate generates mock implementations of interfaces.
- func Generate() (err error) { // nolint: deadcode
- for _, pkg := range packagesToMock {
- err = sh.Run("mockery", "--all", "--case=underscore", "--dir="+pkg, "--exported=false", "--output="+pkg+"/mocks")
- if err != nil {
- return
- }
- }
- return
- }
- // Build builds the binaries.
- func Build() error { // nolint: deadcode
- return sh.RunV("go", "build", "./cmd/presence")
- }
- // Test runs the test suite.
- func Test() error { // nolint: deadcode
- return sh.RunV("go", "test", "-cover", "-race", "./...")
- }
|