diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f21d073..a5f83d7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,6 +18,9 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v4 + with: + # Ensures the exact PR commit is checked out + ref: ${{ github.event.pull_request.head.sha }} - name: Start minikube run: minikube start --memory=max --cpus=max --vm-driver=docker --extra-config=apiserver.service-node-port-range=80-32000 --kubernetes-version=v1.28.9 @@ -62,6 +65,10 @@ jobs: kubectl -n eda get eda eda-demo -o yaml kubectl wait --for condition=Successful --timeout=-1s -f .ci/eda_v1alpha1_eda.${{ matrix.SCENARIO }}.ci.yaml + # - name: Wait for the EDA API pod to be ready + # run: | + # kubectl wait --for condition=Ready pod --timeout=-1s -l app.kubernetes.io/component=eda-api + - name: Test EDA API via API k8s service run: | kubectl port-forward service/eda-demo-api 8081:8000 & diff --git a/roles/eda/templates/eda-api.deployment.yaml.j2 b/roles/eda/templates/eda-api.deployment.yaml.j2 index 90dd261..87d807a 100644 --- a/roles/eda/templates/eda-api.deployment.yaml.j2 +++ b/roles/eda/templates/eda-api.deployment.yaml.j2 @@ -399,10 +399,11 @@ spec: mountPath: /var/cache/nginx - name: nginx-run mountPath: /var/run + restartPolicy: Always + {% if combined_api.resource_requirements is defined %} resources: {{ combined_api.resource_requirements }} {% endif %} - restartPolicy: Always volumes: {% if not ui_disabled %} - name: static-files