Files
athens/e2etests/filesystem.go
Ashish Ranjan 3f26845cff move to github actions from drone (#1823)
* add github actions workflow for tag releases

* migrate drone build &test step to github actions

* fix minio service

* fix indentation

* fix dependency syntax

* remove needs keyword

* fix service hostnames, add protectedredis

* update protected redis docker image

* fix too many args error

* exclude vendor dir from gofmt

* fix fmt errors

* fix fmt errors

* rm .drone.yml

* rename workflow name

* break test step

* remove vendor step

* use makefile rule

* use buildx
2023-02-22 22:47:37 -08:00

41 lines
713 B
Go

//go:build e2etests
// +build e2etests
package e2etests
import (
"fmt"
"os"
"os/exec"
"path/filepath"
)
func setupTestRepo(repoPath, repoURL string) {
os.RemoveAll(repoPath)
cmd := exec.Command("git",
"clone",
repoURL,
repoPath)
cmd.Run()
}
func chmodR(path string, mode os.FileMode) error {
return filepath.Walk(path, func(name string, info os.FileInfo, err error) error {
if err == nil {
os.Chmod(name, mode)
}
return err
})
}
func cleanGoCache(env []string) error {
cmd := exec.Command("go", "clean", "--modcache")
cmd.Env = env
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("Failed to clear go cache: %v - %s", err, string(output))
}
return nil
}