Skip to content

Commit

Permalink
Move up magefile for easier access (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicianoTech authored Jan 28, 2023
1 parent a21eb71 commit f95920e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
22 changes: 0 additions & 22 deletions arc/magefile.go

This file was deleted.

35 changes: 35 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//go:build mage
// +build mage

package main

import (
"github.com/magefile/mage/sh"
)

// Install Arc by building a binary from the current source and placing it in
// the Go PATH
func Install() error {

if err := sh.Run("go", "mod", "download"); err != nil {
return err
}

return sh.Run("go", "install", "./arc")
}

// Remove the Arc binary created from the Install command
func Remove() error {

return sh.Run("go", "clean", "-i", "github.com/hubci/arc/arc")
}

func Test() error {

return sh.Run("gotestsum", "./...")
}

func TestCI() error {

return sh.Run("gotestsum", "--junitfile=junit/unit-tests.xml", "--", "-coverprofile=coverage.txt", "-covermode=atomic", "./...")
}

0 comments on commit f95920e

Please sign in to comment.