Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/resources/core/config.json

This file was deleted.

16 changes: 0 additions & 16 deletions .github/resources/core/docker-compose.yml

This file was deleted.

55 changes: 9 additions & 46 deletions .github/workflows/integration-tests-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: 'Python version'
required: false
type: string
default: '3.8'
default: '3.9'
workflow_call:
inputs:
tag_version:
Expand All @@ -24,21 +24,21 @@ on:
description: 'Python version'
required: false
type: string
default: '3.8'
default: '3.9'

jobs:
run-core-integration-tests:
runs-on: ubuntu-latest
env:
DOCKER_COMPOSE_FILE: ${{ github.workspace }}/.github/resources/core/docker-compose.yml
SERVICE_PORT: 3473
SERVICE_URL: http://localhost:3473
MAX_RETRIES: 30
RETRY_INTERVAL: 2
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Firebolt Core
id: setup-core
uses: firebolt-db/action-setup-core@main
with:
tag_version: ${{ inputs.tag_version || vars.DEFAULT_CORE_IMAGE_TAG }}

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -48,49 +48,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install ".[dev]"

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare docker-compose.yml
run: |
sed -i "s|\${IMAGE_TAG}|${{ inputs.tag_version }}|g" "$DOCKER_COMPOSE_FILE"
sed -i "s|\${BASE_DIR}|${{ github.workspace }}|g" "$DOCKER_COMPOSE_FILE"

- name: Start service container
run: |
docker compose -f "$DOCKER_COMPOSE_FILE" up -d
docker compose -f "$DOCKER_COMPOSE_FILE" ps

- name: Wait for service to be ready
run: |
for i in $(seq 1 $MAX_RETRIES); do
if curl --silent --fail "$SERVICE_URL" --data-binary "SELECT 1" | grep -q "1"; then
echo "Service is up and responding!"
exit 0
fi
echo "Waiting for service... ($i/$MAX_RETRIES)"
sleep $RETRY_INTERVAL
done
echo "Error: Service failed to start within timeout"
docker compose -f "$DOCKER_COMPOSE_FILE" logs
exit 1

- name: Run Core integration tests
env:
CORE_URL: "http://localhost:3473"
CORE_URL: ${{ steps.setup-core.outputs.service_url }}
run: |
pytest -o log_cli=true -o log_cli_level=INFO tests/integration -k "core" --alluredir=allure-results

- name: Stop container
if: always()
run: |
docker compose -f "$DOCKER_COMPOSE_FILE" down

# Need to pull the pages branch in order to fetch the previous runs
- name: Get Allure history
uses: actions/checkout@v4
Expand Down