Skip to content

Commit 45c819c

Browse files
separate job
Signed-off-by: Adrian Cole <[email protected]>
1 parent d98f954 commit 45c819c

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/docker-chatbot-rag-app.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,6 @@ jobs:
5151
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name == 'push' && 'true' || 'false' }}
5252
cache-from: type=gha
5353
cache-to: type=gha,mode=max
54-
- name: start elasticsearch
55-
if: github.event_name == 'pull_request'
56-
run: docker compose -f docker/docker-compose-elastic.yml elasticsearch up -d --wait
57-
- name: test image using index creation
58-
if: github.event_name == 'pull_request'
59-
working-directory: example-apps/chatbot-rag-app
60-
run: |
61-
cp env.example .env
62-
docker compose run --rm -T create-index
6354
- name: export digest
6455
if: github.event_name == 'push'
6556
run: |
@@ -75,6 +66,30 @@ jobs:
7566
if-no-files-found: error
7667
retention-days: 1
7768

69+
# This tests the chatbot-rag-app image by running the create-index command.
70+
# This command only relies on Elasticsearch, and verifies ELSER is working.
71+
test-image:
72+
strategy:
73+
matrix:
74+
runner:
75+
- ubuntu-24.04
76+
- ubuntu-24.04-arm
77+
needs: build-image
78+
if: github.event_name == 'pull_request'
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: start elasticsearch
83+
run: docker compose -f docker/docker-compose-elastic.yml up elasticsearch -d --wait --wait-timeout 120
84+
- name: test image
85+
working-directory: example-apps/chatbot-rag-app
86+
run: |
87+
echo "Testing image ${IMAGE}"
88+
cp env.example .env
89+
docker compose run --rm -T create-index
90+
env:
91+
IMAGE: ${{ steps.build.outputs.digest }}
92+
7893
push-manifest:
7994
runs-on: ubuntu-24.04
8095
needs: build-image

0 commit comments

Comments
 (0)