mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
Update images, fix extrapath (#723)
* 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>
This commit is contained in:
parent
bdc0480934
commit
21760b18c2
21 changed files with 103 additions and 50 deletions
|
@ -16,6 +16,14 @@ import (
|
|||
"github.com/nektos/act/pkg/model"
|
||||
)
|
||||
|
||||
var baseImage string = "node:12-buster-slim"
|
||||
|
||||
func init() {
|
||||
if p := os.Getenv("ACT_TEST_IMAGE"); p != "" {
|
||||
baseImage = p
|
||||
}
|
||||
}
|
||||
|
||||
func TestGraphEvent(t *testing.T) {
|
||||
planner, err := model.NewWorkflowPlanner("testdata/basic", true)
|
||||
assert.Nil(t, err)
|
||||
|
@ -81,7 +89,7 @@ func TestRunEvent(t *testing.T) {
|
|||
}
|
||||
|
||||
platforms := map[string]string{
|
||||
"ubuntu-latest": "node:12.20.1-buster-slim",
|
||||
"ubuntu-latest": baseImage,
|
||||
}
|
||||
|
||||
tables := []TestJobFileInfo{
|
||||
|
@ -89,8 +97,10 @@ func TestRunEvent(t *testing.T) {
|
|||
{"testdata", "fail", "push", "exit with `FAILURE`: 1", platforms, ""},
|
||||
{"testdata", "runs-on", "push", "", platforms, ""},
|
||||
{"testdata", "checkout", "push", "", platforms, ""},
|
||||
// Pwsh is not available in default worker (yet) so we use a separate image for testing
|
||||
{"testdata", "powershell", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/justingrote/act-pwsh:latest"}, ""},
|
||||
{"testdata", "shells/pwsh", "push", "", map[string]string{"ubuntu-latest": "ghcr.io/justingrote/act-pwsh:latest"}, ""}, // custom image with pwsh
|
||||
{"testdata", "shells/bash", "push", "", platforms, ""},
|
||||
{"testdata", "shells/python", "push", "", map[string]string{"ubuntu-latest": "node:12-buster"}, ""}, // slim doesn't have python
|
||||
{"testdata", "shells/sh", "push", "", platforms, ""},
|
||||
{"testdata", "job-container", "push", "", platforms, ""},
|
||||
{"testdata", "job-container-non-root", "push", "", platforms, ""},
|
||||
{"testdata", "uses-docker-url", "push", "", platforms, ""},
|
||||
|
@ -131,7 +141,7 @@ func TestRunEventSecrets(t *testing.T) {
|
|||
ctx := context.Background()
|
||||
|
||||
platforms := map[string]string{
|
||||
"ubuntu-latest": "node:12.20.1-buster-slim",
|
||||
"ubuntu-latest": baseImage,
|
||||
}
|
||||
|
||||
workflowPath := "secrets"
|
||||
|
@ -172,7 +182,7 @@ func TestRunEventPullRequest(t *testing.T) {
|
|||
ctx := context.Background()
|
||||
|
||||
platforms := map[string]string{
|
||||
"ubuntu-latest": "node:12.20.1-buster-slim",
|
||||
"ubuntu-latest": baseImage,
|
||||
}
|
||||
|
||||
workflowPath := "pull-request"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue