From 66a6556b567bee551de79de8fcae699ca34aabc7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 25 Jun 2026 11:57:36 +0300 Subject: Include Magefile tests in verification for 1r0 --- Magefile.go | 15 +++++++++++---- 1 file 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 +} -- cgit v1.2.3