a9fe038347
* fix: typo * fix: remove debug for git references it generates a massive amount of logs * feat: read values from env allows to test act on GHA when it's not a main repo * fix: merge extrapath with PATH * fix(tests): add additional shells for testing * fix(image): update images pin node to major version only, current node version: 12.22.1 replace most images with `node:12-buster-slim` to prevent errors on macOS runner due to DockerHub pull limit replace ocaml image Co-authored-by: Casey Lee <cplee@nektos.com>
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
package runner
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/nektos/act/pkg/common"
|
|
)
|
|
|
|
func TestStepContextExecutor(t *testing.T) {
|
|
platforms := map[string]string{
|
|
"ubuntu-latest": baseImage,
|
|
}
|
|
tables := []TestJobFileInfo{
|
|
{"testdata", "uses-and-run-in-one-step", "push", "Invalid run/uses syntax for job:test step:Test", platforms, ""},
|
|
{"testdata", "uses-github-empty", "push", "Expected format {org}/{repo}[/path]@ref", platforms, ""},
|
|
{"testdata", "uses-github-noref", "push", "Expected format {org}/{repo}[/path]@ref", platforms, ""},
|
|
{"testdata", "uses-github-root", "push", "", platforms, ""},
|
|
{"testdata", "uses-github-path", "push", "", platforms, ""},
|
|
{"testdata", "uses-docker-url", "push", "", platforms, ""},
|
|
{"testdata", "uses-github-full-sha", "push", "", platforms, ""},
|
|
{"testdata", "uses-github-short-sha", "push", "Unable to resolve action `actions/hello-world-docker-action@b136eb8`, the provided ref `b136eb8` is the shortened version of a commit SHA, which is not supported. Please use the full commit SHA `b136eb8894c5cb1dd5807da824be97ccdf9b5423` instead", platforms, ""},
|
|
}
|
|
// These tests are sufficient to only check syntax.
|
|
ctx := common.WithDryrun(context.Background(), true)
|
|
for _, table := range tables {
|
|
runTestJobFile(ctx, t, table)
|
|
}
|
|
}
|