From eed58492aa487101d011b2337172dcb8a8f46dee Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Thu, 7 Feb 2019 09:09:19 -0800 Subject: [PATCH] skip integration test in GH actions --- .github/actions/check/entrypoint.sh | 2 +- actions/runner_test.go | 6 ++++++ actions/testdata/env.workflow | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 actions/testdata/env.workflow diff --git a/.github/actions/check/entrypoint.sh b/.github/actions/check/entrypoint.sh index f38f6f6d..4a2cbeb3 100644 --- a/.github/actions/check/entrypoint.sh +++ b/.github/actions/check/entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/sh set -e golangci-lint run -go test -cover ./... \ No newline at end of file +go test -cover -short ./... \ No newline at end of file diff --git a/actions/runner_test.go b/actions/runner_test.go index f7ae23e3..aea55f1a 100644 --- a/actions/runner_test.go +++ b/actions/runner_test.go @@ -9,6 +9,10 @@ import ( ) func TestRunEvent(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + tables := []struct { workflowPath string eventName string @@ -18,6 +22,8 @@ func TestRunEvent(t *testing.T) { {"pipe.workflow", "push", ""}, {"fail.workflow", "push", "exit with `FAILURE`: 1"}, {"regex.workflow", "push", "exit with `NEUTRAL`: 78"}, + {"gitref.workflow", "push", ""}, + {"env.workflow", "push", ""}, } log.SetLevel(log.DebugLevel) diff --git a/actions/testdata/env.workflow b/actions/testdata/env.workflow new file mode 100644 index 00000000..847d1d43 --- /dev/null +++ b/actions/testdata/env.workflow @@ -0,0 +1,9 @@ +workflow "test" { + on = "push" + resolves = ["test-action"] +} + +action "test-action" { + uses = "docker://alpine:3.9" + runs = ["sh", "-c", "echo $GITHUB_REPOSITORY | grep '^nektos/act$'"] +} \ No newline at end of file