diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-25 11:57:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-25 11:57:36 +0300 |
| commit | 66a6556b567bee551de79de8fcae699ca34aabc7 (patch) | |
| tree | 444834bd62b3548cb207351f4da1d46f36fe861d | |
| parent | 37f0670249aedd92d573454f156618138c57029e (diff) | |
Include Magefile tests in verification for 1r0
| -rw-r--r-- | Magefile.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Magefile.go b/Magefile.go index 6782f90..f3f7a16 100644 --- a/Magefile.go +++ b/Magefile.go @@ -42,10 +42,7 @@ func Run() error { // Test runs all tests. func Test() error { fmt.Println("Running tests...") - if err := sh.RunV("go", "test", "./..."); err != nil { - return fmt.Errorf("test: %w", err) - } - return nil + return runTests() } // Verify runs formatting and static checks before tests. @@ -116,3 +113,13 @@ func installBinDir() (string, error) { return filepath.Join(goPath, "bin"), nil } + +func runTests() error { + if err := sh.RunV("go", "test", "./..."); err != nil { + return fmt.Errorf("test packages: %w", err) + } + if err := sh.RunV("go", "test", "-tags", "mage", "."); err != nil { + return fmt.Errorf("test Magefile: %w", err) + } + return nil +} |
