CI: Move e2e test pipeline from Drone to GitHub Actions (#103134)
* Add e2e dagger pipeline * various-suite not various suite * upload videos dir * produce e2e videos even on failure * nil ref * sync doesn't return container * fix quotes * try without flags first? * try without quoting? * use two dashes in flags * update CODEOWNERS * make update-workspace * go work sync * make update-workspace * add newline
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
func RunSuite(d *dagger.Client, svc *dagger.Service, src *dagger.Directory, cache *dagger.CacheVolume, suite string) *dagger.Container {
|
||||
return WithYarnCache(WithGrafanaFrontend(d.Container().From("cypress/included:13.1.0"), src), cache).
|
||||
WithWorkdir("/src").
|
||||
WithEnvVariable("HOST", "grafana").
|
||||
WithEnvVariable("PORT", "3001").
|
||||
WithServiceBinding("grafana", svc).
|
||||
WithExec([]string{"yarn", "install", "--immutable"}).
|
||||
WithExec([]string{
|
||||
"/bin/bash", "-c",
|
||||
fmt.Sprintf("./e2e/run-suite %s true", suite),
|
||||
}, dagger.ContainerWithExecOpts{
|
||||
Expect: dagger.ReturnTypeAny,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user