Skip to content

Commit

Permalink
Adding simple test
Browse files Browse the repository at this point in the history
Added CI implementation
  • Loading branch information
blaskoa committed Nov 13, 2023
1 parent 940bec2 commit 0039cd9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
# this is needed only temporarily - see https://github.com/helm/helm/issues/12423
version: 3.12.3
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install kubectl
uses: azure/setup-kubectl@v3
- name: Build helm dependencies
run: |
helm dependency build .
Expand All @@ -30,3 +32,25 @@ jobs:
- uses: actions/setup-python@v3
- uses: gabe565/setup-helm-docs-action@v1
- uses: pre-commit/[email protected]
- name: Create kind cluster
uses: helm/[email protected]
- name: Install chart prerequisites
env:
REGISTRY_PASS: ${{ secrets.REGISTRY_PASS }}
LICENSE_BASE64: ${{ secrets.LICENSE_BASE64 }}
run: |
kubectl create secret docker-registry --dry-run=client sf-gitlab-registry-creds \
--docker-server=registry.gitlab.com \
--docker-username=sf-distribution \
--docker-password=$(REGISTRY_PASS) -o yaml > docker-secret.yaml
echo $(LICENSE_BASE64) | base64 -d > iengine.lic
kubectl create secret generic --dry-run=client iface-lic \
--from-file=iengine.lic -o yaml > lic-secret.yaml
kubectl apply -f docker-secret.yaml
kubectl apply -f lic-secret.yaml
- name: Install helm chart
run: |
helm install smartface .
- name: Test helm chart
run: |
helm test smartface
19 changes: 19 additions & 0 deletions templates/tests/watchlist-api-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
name: "wl-test"
annotations:
"helm.sh/hook": test
spec:
containers:
- name: test
image: registry.gitlab.com/innovatrics/smartface/sf-cloud-func-test:2
args: ['--filter', 'SkipOnPlatform!=Cloud']
env:
- name: "SF_TEST_API_URL"
value: "http://{{ include "smartface.api.name" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.api.servicePort }}"
restartPolicy: Never
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}

0 comments on commit 0039cd9

Please sign in to comment.