Skip to content

Support GET for search-related queries (#107) #20

Support GET for search-related queries (#107)

Support GET for search-related queries (#107) #20

Workflow file for this run

name: E2E tests
on: # @TODO TBD WHEN WE RUN
push:
branches: [ "main" ]
workflow_dispatch:
inputs:
GIT_REF:
description: 'Commit hash to run the tests'
required: true
jobs:
build-quesma-docker-image:
strategy:
matrix:
module: [ "quesma" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: ## @TODO REMOVE
ref: ${{ github.event.inputs.GIT_REF }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: ${{ matrix.module }}/go.sum
go-version: '1.22'
- name: Build and export
uses: docker/build-push-action@v5
with:
context: ${{ matrix.module }}/.
tags: ${{ matrix.module }}:latest
outputs: type=docker,dest=/tmp/image.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.module }}
path: /tmp/image.tar
retention-days: 1
e2e-test-run:
runs-on: ubuntu-latest
needs: [build-quesma-docker-image]
steps:
- uses: actions/checkout@v4
with: ## @TODO REMOVE
ref: ${{ github.event.inputs.GIT_REF }}
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: smoke-test/go.sum
go-version: '1.22'
- name: Download images
uses: actions/download-artifact@v4
with:
path: /tmp/images
- name: Load images
run: |
for file in /tmp/images/*/*.tar; do
docker load --input $file
done
docker image ls -a
- name: Build and start docker-compose
timeout-minutes: 10
run: docker-compose -f docker/e2e.yml up -d
- name: Wait until Elasticsearch is up
timeout-minutes: 6
run: until [ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" = "200" ]; do sleep 3; done
- name: Wait until ClickHouse is up
timeout-minutes: 6
run: until [ "$(curl -s -o /dev/null -w "%{http_code}" localhost:8123)" = "200" ]; do sleep 3; done
- name: Wait until Quesma is up ('/' is call routed to Elasticsearch)
timeout-minutes: 6
run: until [ "$(curl -s -o /dev/null -w "%{http_code}" localhost:8080)" = "200" ]; do sleep 3; done
- name: Run e2e tests
working-directory: quesma
run: go test --tags=integration -v ./...