Port CI to Gitea.com (#1)

# Problems
- [x] Some env variables from act itself / act_runner let the tests fail.
- [ ] CI takes too long to clone actions, need to speed up the used act_runner by sparse checkout
    - Runners are reused this speeds up once every runner has ran every job
- [ ] Qemu setup is broken and do not add all platforms like GitHub CI expected`  linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/loong64,linux/arm/v7,linux/arm/v6` got `linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/386` without qemu set up
  - Test Disabled
- [x] ACTIONS_RUNTIME_TOKEN needs to be unset
- [ ] Snapshot needs our version of the npm package / patching
  - Test Disabled
- [ ] ACTIONS_RESULTS_URL:http://127.0.0.1:12345/ seems to be a fallback to localhost this is a problem
  - Test Disabled

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/1
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
Christopher Homberger
2025-11-27 14:57:23 +00:00
committed by ChristopherHX
parent 2c1a559406
commit 83cbf1f2b8
7 changed files with 265 additions and 13 deletions

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"io"
"os"
"os/exec"
"path"
"path/filepath"
"runtime"
@@ -329,11 +330,16 @@ func TestRunEvent(t *testing.T) {
// local remote action overrides
{workdir, "local-remote-action-overrides", "push", "", platforms, secrets},
}
// docker action on host executor
{workdir, "docker-action-host-env", "push", "", platforms, secrets},
// docker service on host executor
{workdir, "nginx-service-container-host-mode", "push", "", platforms, secrets},
if _, ok := os.LookupEnv("DOOD"); !ok {
// Does not work in Docker Out of Docker context, e.g. -v /var/run/docker.sock:/var/run/docker.sock
tables = append(tables, []TestJobFileInfo{
// docker action on host executor
{workdir, "docker-action-host-env", "push", "", platforms, secrets},
// docker service on host executor
{workdir, "nginx-service-container-host-mode", "push", "", platforms, secrets},
}...)
}
for _, table := range tables {
@@ -552,7 +558,6 @@ func TestRunEventHostEnvironment(t *testing.T) {
tables = append(tables, []TestJobFileInfo{
// Shells
{workdir, "shells/defaults", "push", "", platforms, secrets},
{workdir, "shells/pwsh", "push", "", platforms, secrets},
{workdir, "shells/bash", "push", "", platforms, secrets},
{workdir, "shells/python", "push", "", platforms, secrets},
{workdir, "shells/sh", "push", "", platforms, secrets},
@@ -599,6 +604,13 @@ func TestRunEventHostEnvironment(t *testing.T) {
{workdir, "evalenv", "push", "", platforms, secrets},
{workdir, "ensure-post-steps", "push", "Job 'second-post-step-should-fail' failed", platforms, secrets},
}...)
// No pwsh on current default container image
if pwsh, err := exec.LookPath("pwsh"); err == nil && pwsh != "" {
tables = append(tables, []TestJobFileInfo{
{workdir, "shells/pwsh", "push", "", platforms, secrets},
}...)
}
}
if runtime.GOOS == "windows" {
platforms := map[string]string{
@@ -692,6 +704,9 @@ func TestRunDifferentArchitecture(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
if _, ok := os.LookupEnv("NO_QEMU"); ok {
t.Skip("skipping test because QEMU is disabled")
}
tjfi := TestJobFileInfo{
workdir: workdir,