fix(ci): add bash unittests
changelog / changelog (push) Successful in 17s
Bash / bash-unittest (push) Failing after 23s
Helm / helm-lint (push) Successful in 8s
Helm / helm-unittest (push) Successful in 1m11s

This commit is contained in:
2026-09-14 20:57:01 +02:00
parent d35177ec71
commit 4016c5396d
3 changed files with 28 additions and 34 deletions
+21
View File
@@ -0,0 +1,21 @@
name: Bash
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches:
- '**'
tags-ignore:
- '**'
workflow_dispatch: {}
jobs:
bash-unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
submodules: true
- name: Run bash unittests
run: make bash/unittest
+7
View File
@@ -41,6 +41,13 @@ PHONY+=helm/unittest
helm/unittest: helm/unittest:
helm unittest --strict --file 'unittests/helm/**/*.yaml' --file 'unittests/helm/values-conflicting-checks.yaml' ./ helm unittest --strict --file 'unittests/helm/**/*.yaml' --file 'unittests/helm/values-conflicting-checks.yaml' ./
# BASH PREPARE
# ==============================================================================
PHONY+=bash/prepare
bash/prepare:
git submodule init
git submodule update
# BASH UNITTESTS # BASH UNITTESTS
# ============================================================================== # ==============================================================================
PHONY+=bash/unittest PHONY+=bash/unittest
@@ -1,34 +0,0 @@
suite: test connection template
release:
name: gitea-unittests
namespace: testing
templates:
- templates/tests/test-http-connection.yaml
tests:
- it: renders openshift-compatible defaults for the test pod
set:
openshift.enabled: true
asserts:
- notExists:
path: spec.hostUsers
- equal:
path: spec.containers[0].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
- it: renders an explicit hostUsers=false override for the test pod
set:
openshift:
enabled: true
deployment:
hostUsers: false
asserts:
- equal:
path: spec.hostUsers
value: false