Skip to content

Commit

Permalink
👷 ci: Test
Browse files Browse the repository at this point in the history
  • Loading branch information
MfCrizz committed Sep 15, 2023
1 parent f800c03 commit 83bd65c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
version: v3.12.3

- name: Kubectl tool installer
uses: Azure/setup-kubectl@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -35,20 +38,14 @@ jobs:
with:
addons: ingress

- name: Cache Skaffold layers
uses: actions/cache@v3
with:
path: ~/.skaffold/
key: fixed-${{ github.sha }}
- name: add db
run: helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Run Skaffold and Deploy to Minikube Cluster
uses: hiberbee/[email protected]
with:
command: run
skip-tests: true
- name: install db
run: helm install unguard-mariadb bitnami/mariadb --set primary.persistence.enabled=false --wait --namespace unguard --create-namespace

- name: Run chart-testing
run: helm test unguard --namespace unguard --timeout 10m0s
- name: install unguard
run: helm install unguard ./chart --wait --namespace unguard --create-namespace

- name: Print Chart testing logs
run: kubectl logs unguard-frontend-connection -n unguard
- name: Run chart-testing
run: helm test unguard --namespace unguard --timeout 10m0s --logs
5 changes: 4 additions & 1 deletion chart/templates/tests/test-frontend-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ spec:
- name: SIMULATE_PRIVATE_RANGES
value: {{quote .Values.userSimulator.cronJob.jobTemplate.container.env.SIMULATE_PRIVATE_RANGES}}
command: ["/bin/sh"]
args: ["-c", "node_modules/.bin/element run default-user-sim.perf.ts 2>&1 | tee /dev/stderr | grep -qE '([1-9]|[0-9][0-9]) failed|([1-9]|[0-9][0-9]) unexecuted' && exit 1 || exit 0"]
#args: ["-c", "while true; do echo Welcome to JournalDev; sleep 100;done"]
#args: ["-c", "node_modules/.bin/element run default-user-sim.perf.ts 2>&1 | tee /dev/stderr | grep -qE '([1-9]|[0-9][0-9]) failed|([1-9]|[0-9][0-9]) unexecuted' && exit 1 || exit 0"]
#args: ["-c", "node_modules/.bin/element run default-user-sim.perf.ts 2>&1 | tee log.txt | grep -qE '([1-9]|[0-9][0-9]) failed|([1-9]|[0-9][0-9]) unexecuted' && exit 1 || exit 0"]
args: ["-c", "node_modules/.bin/element run default-user-sim.perf.ts 2>&1"]
resources:
requests:
cpu: {{quote .Values.userSimulator.cronJob.jobTemplate.container.resources.requests.cpu}}
Expand Down

0 comments on commit 83bd65c

Please sign in to comment.