forked from project-kessel/inventory-api
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
86deaba
commit 0081779
Showing
1 changed file
with
42 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,42 @@ | ||
name: E2E Testing with Kind | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
branches: ['main'] | ||
|
||
concurrency: | ||
group: ci-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2e-test: | ||
name: E2E Test Inventory API | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Environment Variables | ||
env: | ||
DOCKER_SERVER: registry.access.redhat.com | ||
QUAY_USERNAME: user | ||
QUAY_PASSWORD: pass | ||
QUAY_EMAIL: [email protected] | ||
run: | | ||
echo "Setting up environment variables for Quay authentication." | ||
- name: Inventory Up - Kind Cluster | ||
run: make inventory-up-kind | ||
|
||
- name: Monitor Pods in Kind | ||
run: | | ||
kubectl get pods -w --timeout=300s || exit 1 | ||
- name: View Test Pod Logs | ||
run: | | ||
TEST_POD=$(kubectl get pods --selector=job-name=e2e-inventory-http-tests -o jsonpath='{.items[0].metadata.name}') | ||
kubectl logs $TEST_POD | ||
- name: Inventory Down - Kind Cluster | ||
run: make inventory-down-kind | ||
|