-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: M Sajid Mansoori <[email protected]>
- Loading branch information
1 parent
7ed3578
commit 5ea7d43
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
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,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 |