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
|
@ -308,13 +308,28 @@ func TestGetGitHubContext(t *testing.T) {
|
|||
|
||||
log.Debugf("%v", ghc)
|
||||
|
||||
actor := "nektos/act"
|
||||
if a := os.Getenv("ACT_ACTOR"); a != "" {
|
||||
actor = a
|
||||
}
|
||||
|
||||
repo := "nektos/act"
|
||||
if r := os.Getenv("ACT_REPOSITORY"); r != "" {
|
||||
repo = r
|
||||
}
|
||||
|
||||
owner := "nektos"
|
||||
if o := os.Getenv("ACT_OWNER"); o != "" {
|
||||
owner = o
|
||||
}
|
||||
|
||||
assert.Equal(t, ghc.RunID, "1")
|
||||
assert.Equal(t, ghc.Workspace, rc.Config.containerPath(cwd))
|
||||
assert.Equal(t, ghc.RunNumber, "1")
|
||||
assert.Equal(t, ghc.RetentionDays, "0")
|
||||
assert.Equal(t, ghc.Actor, "nektos/act")
|
||||
assert.Equal(t, ghc.Repository, "nektos/act")
|
||||
assert.Equal(t, ghc.RepositoryOwner, "nektos")
|
||||
assert.Equal(t, ghc.Actor, actor)
|
||||
assert.Equal(t, ghc.Repository, repo)
|
||||
assert.Equal(t, ghc.RepositoryOwner, owner)
|
||||
assert.Equal(t, ghc.RunnerPerflog, "/dev/null")
|
||||
assert.Equal(t, ghc.EventPath, ActPath+"/workflow/event.json")
|
||||
assert.Equal(t, ghc.Token, rc.Config.Secrets["GITHUB_TOKEN"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue