-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Run Skaffold Pipeline, Deploy to Minikube Cluster and run Unguard Helm Test | ||
on: | ||
pull_request: | ||
paths: | ||
- src/** | ||
- skaffold.yaml | ||
- chart/** | ||
|
||
jobs: | ||
lint-build-run-test-unguard: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.12.3 | ||
|
||
- name: Kubectl tool installer | ||
uses: Azure/setup-kubectl@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
check-latest: true | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --chart-dirs . --charts ./chart --validate-maintainers=false --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Set up Minikube | ||
uses: medyagh/[email protected] | ||
with: | ||
addons: ingress | ||
|
||
- name: Cache Skaffold layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.skaffold/ | ||
key: fixed-${{ github.sha }} | ||
|
||
- name: Run Skaffold and Deploy to Minikube Cluster | ||
uses: hiberbee/[email protected] | ||
with: | ||
command: run | ||
skip-tests: true | ||
|
||
- name: Run chart-testing | ||
run: helm test unguard --namespace unguard --timeout 10m0s --logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: unguard-frontend-connection | ||
labels: | ||
app.kubernetes.io/name: unguard-frontend-connection | ||
app.kubernetes.io/part-of: unguard | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: unguard-{{.Values.userSimulator.name}} | ||
image: {{.Values.userSimulator.cronJob.jobTemplate.container.image.repository}}:{{.Values.userSimulator.cronJob.jobTemplate.container.image.tag}} | ||
imagePullPolicy: {{.Values.userSimulator.cronJob.jobTemplate.container.image.pullPolicy}} | ||
env: | ||
- name: FRONTEND_ADDR | ||
value: {{quote .Values.userSimulator.cronJob.jobTemplate.container.env.FRONTEND_ADDR}} | ||
- 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 --export 2>&1 && jq -e '.testScripts[].iterationResults[].stepResults[] | select(.status == \"failed\") | .name' reports/default-user-sim.perf/*/data.json >/dev/null && exit 1 || exit 0"] | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters