e2etests-cli: Skip png tests on CI
PNG renders seem to work intermittently on github actions so whatever. If we're ignoring the diffs we might as well not even run these on CI.
This commit is contained in:
parent
7077f2edef
commit
ae689fcc1f
1 changed files with 13 additions and 5 deletions
|
|
@ -19,10 +19,12 @@ func TestCLI_E2E(t *testing.T) {
|
|||
|
||||
tca := []struct {
|
||||
name string
|
||||
skipCI bool
|
||||
run func(t *testing.T, ctx context.Context, dir string, env *xos.Env)
|
||||
}{
|
||||
{
|
||||
name: "hello_world_png",
|
||||
skipCI: true,
|
||||
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
||||
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
||||
err := runTestMain(t, ctx, dir, env, "hello-world.d2", "hello-world.png")
|
||||
|
|
@ -33,6 +35,7 @@ func TestCLI_E2E(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "hello_world_png_pad",
|
||||
skipCI: true,
|
||||
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
||||
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
||||
err := runTestMain(t, ctx, dir, env, "--pad=400", "hello-world.d2", "hello-world.png")
|
||||
|
|
@ -43,6 +46,7 @@ func TestCLI_E2E(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "hello_world_png_sketch",
|
||||
skipCI: true,
|
||||
run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) {
|
||||
writeFile(t, dir, "hello-world.d2", `x -> y`)
|
||||
err := runTestMain(t, ctx, dir, env, "--sketch", "hello-world.d2", "hello-world.png")
|
||||
|
|
@ -126,6 +130,10 @@ scenarios: {
|
|||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if tc.skipCI && os.Getenv("CI") != "" {
|
||||
t.SkipNow()
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Minute*5)
|
||||
defer cancel()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue