Skip to content

Commit

Permalink
Add tier0 pr tester workflow
Browse files Browse the repository at this point in the history
Signed-off-by: M Sajid Mansoori <[email protected]>
  • Loading branch information
msajidmansoori12 committed Feb 13, 2025
1 parent 7ed3578 commit 5ea7d43
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ui-tier0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Test UI TIER0

on:
push:
branches:
- main


jobs:
k8s:
runs-on: ubuntu-latest
steps:
- name: Checkout tackle
uses: actions/checkout@v2
with:
repository: konveyor/tackle
path: tackle

- name: Setup minikube
uses: konveyor/tackle2-operator/.github/actions/start-minikube@main
with:
memory: 'max'
cpus: 'max'

- name: Install konveyor
uses: konveyor/tackle2-operator/.github/actions/install-konveyor@main
with:
tackle_cr: '{"kind":"Tackle","apiVersion":"tackle.konveyor.io/v1alpha1","metadata":{"name":"tackle"},"spec":{"image_pull_policy":"IfNotPresent","feature_auth_required":true}}'

- name: Wait for pods to be ready.
run: sleep 150s
shell: bash

- name: Check pod status
run: kubectl get pods -n konveyor-tackle

- name: Wait for Ingress
shell: bash
run: |
bash -c 'external_ip="";
echo $external_ip;
while [[ -z $external_ip ]]
do
echo "Waiting for end point..."
external_ip=$(kubectl get ingress tackle --template="{{range.status.loadBalancer.ingress}}{{.ip}}{{end}}" -n konveyor-tackle);[[ -z $external_ip ]] &&
echo $external_ip;
sleep 10;
done
echo "End point ready:" &&
echo $external_ip;
export endpoint=$(minikube ip);
echo "CYPRESS_tackleUrl=https://$endpoint" >>$GITHUB_ENV'
- name: Checkout to branch
uses: actions/checkout@v2

- name: Install NPM
run: npm install .
- name: Run cypress login test
run: npx cypress run --spec "cypress/e2e/tests/login.test.ts" --env user="admin",pass="password",tackleUrl=${{ env.CYPRESS_tackleUrl }}
- name: Run Tier0 test cases
run: |
CYPRESS_INCLUDE_TAGS=@tier0 npx cypress run --spec **/*.test.ts --env user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: minikube-tests-screenshots
path: tackle-ui-tests/cypress/screenshots

0 comments on commit 5ea7d43

Please sign in to comment.