feat: rename any form of act runner to gitea runner or runner (#149)

fix: https://gitea.com/gitea/helm-actions/issues/142
Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/149
Reviewed-by: Nicolas <bircni@icloud.com>
Co-authored-by: Daan <dselen@nerthus.nl>
Co-committed-by: Daan <dselen@nerthus.nl>
This commit is contained in:
2026-05-20 20:08:01 +00:00
committed by DaanSelen
parent fd75b282b8
commit 7e2aedfdc2
9 changed files with 140 additions and 139 deletions
@@ -1,22 +1,22 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: actions template | config-act-runner
suite: actions template | configmap
release:
name: gitea-actions-unittests
namespace: testing
templates:
- templates/config-act-runner.yaml
- templates/configmap.yaml
tests:
- it: doesn't renders a ConfigMap by default
template: templates/config-act-runner.yaml
template: templates/configmap.yaml
asserts:
- hasDocuments:
count: 0
- it: renders a ConfigMap
template: templates/config-act-runner.yaml
template: templates/configmap.yaml
set:
enabled: true
statefulset:
actRunner:
runner:
config: |
log:
level: info
@@ -31,7 +31,7 @@ tests:
- containsDocument:
kind: ConfigMap
apiVersion: v1
name: gitea-actions-unittests-act-runner-config
name: gitea-actions-unittests-runner-configmap
- equal:
path: data["config.yaml"]
value: |
@@ -43,11 +43,11 @@ tests:
labels:
- "ubuntu-latest"
- it: renders a ConfigMap with inline yaml
template: templates/config-act-runner.yaml
template: templates/configmap.yaml
set:
enabled: true
statefulset:
actRunner:
runner:
config: |
container:
valid_volumes:
@@ -59,7 +59,7 @@ tests:
- containsDocument:
kind: ConfigMap
apiVersion: v1
name: gitea-actions-unittests-act-runner-config
name: gitea-actions-unittests-runner-configmap
- matchRegex:
path: data["config.yaml"]
pattern: '(?m)^\s*options:\s*-v /var/run/docker.sock:/var/run/docker.sock\s*$'
+30 -30
View File
@@ -4,7 +4,7 @@ release:
namespace: testing
templates:
- templates/statefulset.yaml
- templates/config-act-runner.yaml
- templates/configmap.yaml
tests:
#
## GENERIC
@@ -27,10 +27,10 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.metadata.annotations["checksum/config"]
value: "368836e4e5d947f06f2d65c7cc3fc3ad050aaced506443f54a8ffc17bb11afd2"
value: "b1dcfbe4aaba3dff467bdff776855cea97ded4106ab8030a38a719c47583f4b1"
- it: Has fsGroup in securityContext
template: templates/statefulset.yaml
@@ -44,7 +44,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.securityContext["fsGroup"]
value: 1000
@@ -61,7 +61,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
value: "OnRootMismatch"
@@ -78,7 +78,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.securityContext["fsGroupChangePolicy"]
value: "Always"
@@ -95,7 +95,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].env[0]
value:
@@ -116,7 +116,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].env[1]
value:
@@ -143,7 +143,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].env[1]
value:
@@ -170,7 +170,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].env[1]
value:
@@ -225,65 +225,65 @@ tests:
value: "test-storageclass"
#
## ACT_RUNNER
## GITEA_RUNNER
#
- it: act-runner uses fullOverride
template: templates/statefulset.yaml
set:
enabled: true
statefulset.actRunner.fullOverride: test.io/act_runner:x.y.z
statefulset.runner.fullOverride: test.io/runner:x.y.z
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].image
value: test.io/act_runner:x.y.z
value: test.io/runner:x.y.z
- it: act-runner uses digest
template: templates/statefulset.yaml
set:
enabled: true
statefulset.actRunner.tag: 0.3.1
statefulset.actRunner.digest: sha256:abcdef123456
statefulset.runner.tag: 1.0.4
statefulset.runner.digest: sha256:abcdef123456
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].image
value: docker.gitea.com/act_runner:0.3.1@sha256:abcdef123456
value: docker.gitea.com/runner:1.0.4@sha256:abcdef123456
- it: act-runner uses global.imageRegistry
template: templates/statefulset.yaml
set:
enabled: true
global.imageRegistry: test.io
statefulset.actRunner.tag: 0.3.1
statefulset.runner.tag: 1.0.4
asserts:
- hasDocuments:
count: 1
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].image
value: test.io/act_runner:0.3.1
value: test.io/runner:1.0.4
- it: renders additional environment variables for act-runner container in StatefulSet
template: templates/statefulset.yaml
set:
enabled: true
statefulset:
actRunner:
runner:
extraEnvs:
- name: "CUSTOM_ENV"
value: "1"
@@ -297,7 +297,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.containers[0].env[4]
value:
@@ -318,7 +318,7 @@ tests:
extraVolumes:
- name: my-act-runner-volume
emptyDir: {}
actRunner:
runner:
extraVolumeMounts:
- mountPath: /mnt
name: my-act-runner-volume
@@ -328,7 +328,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- contains:
any: true
path: spec.template.spec.containers[0].volumeMounts
@@ -351,7 +351,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.initContainers[1].image
value: test.io/dind:x.y.z
@@ -368,7 +368,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.initContainers[1].image
value: test.io/docker:28.3.3-dind
@@ -407,7 +407,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- contains:
any: true
path: spec.template.spec.initContainers[1].volumeMounts
@@ -430,7 +430,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.initContainers[0].image
value: test.io/busybox:x.y.z
@@ -447,7 +447,7 @@ tests:
- containsDocument:
kind: StatefulSet
apiVersion: apps/v1
name: gitea-actions-unittests-act-runner
name: gitea-actions-unittests-runner
- equal:
path: spec.template.spec.initContainers[0].image
value: test.io/busybox:1.37.0