Skip to content

Commit 40f0e80

Browse files
authored
ci(NoTicket): Use shared core action (#111)
1 parent b0792f9 commit 40f0e80

File tree

3 files changed

+9
-69
lines changed

3 files changed

+9
-69
lines changed

.github/resources/core/config.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/resources/core/docker-compose.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/integration-tests-core.yml

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: 'Python version'
1313
required: false
1414
type: string
15-
default: '3.8'
15+
default: '3.9'
1616
workflow_call:
1717
inputs:
1818
tag_version:
@@ -24,21 +24,21 @@ on:
2424
description: 'Python version'
2525
required: false
2626
type: string
27-
default: '3.8'
27+
default: '3.9'
2828

2929
jobs:
3030
run-core-integration-tests:
3131
runs-on: ubuntu-latest
32-
env:
33-
DOCKER_COMPOSE_FILE: ${{ github.workspace }}/.github/resources/core/docker-compose.yml
34-
SERVICE_PORT: 3473
35-
SERVICE_URL: http://localhost:3473
36-
MAX_RETRIES: 30
37-
RETRY_INTERVAL: 2
3832
steps:
3933
- name: Check out code
4034
uses: actions/checkout@v4
4135

36+
- name: Setup Firebolt Core
37+
id: setup-core
38+
uses: firebolt-db/action-setup-core@main
39+
with:
40+
tag_version: ${{ inputs.tag_version || vars.DEFAULT_CORE_IMAGE_TAG }}
41+
4242
- name: Set up Python
4343
uses: actions/setup-python@v5
4444
with:
@@ -48,49 +48,12 @@ jobs:
4848
run: |
4949
python -m pip install --upgrade pip
5050
pip install ".[dev]"
51-
52-
- name: Log in to GitHub Container Registry
53-
uses: docker/login-action@v3
54-
with:
55-
registry: ghcr.io
56-
username: ${{ github.actor }}
57-
password: ${{ secrets.GITHUB_TOKEN }}
58-
59-
- name: Prepare docker-compose.yml
60-
run: |
61-
sed -i "s|\${IMAGE_TAG}|${{ inputs.tag_version }}|g" "$DOCKER_COMPOSE_FILE"
62-
sed -i "s|\${BASE_DIR}|${{ github.workspace }}|g" "$DOCKER_COMPOSE_FILE"
63-
64-
- name: Start service container
65-
run: |
66-
docker compose -f "$DOCKER_COMPOSE_FILE" up -d
67-
docker compose -f "$DOCKER_COMPOSE_FILE" ps
68-
69-
- name: Wait for service to be ready
70-
run: |
71-
for i in $(seq 1 $MAX_RETRIES); do
72-
if curl --silent --fail "$SERVICE_URL" --data-binary "SELECT 1" | grep -q "1"; then
73-
echo "Service is up and responding!"
74-
exit 0
75-
fi
76-
echo "Waiting for service... ($i/$MAX_RETRIES)"
77-
sleep $RETRY_INTERVAL
78-
done
79-
echo "Error: Service failed to start within timeout"
80-
docker compose -f "$DOCKER_COMPOSE_FILE" logs
81-
exit 1
82-
8351
- name: Run Core integration tests
8452
env:
85-
CORE_URL: "http://localhost:3473"
53+
CORE_URL: ${{ steps.setup-core.outputs.service_url }}
8654
run: |
8755
pytest -o log_cli=true -o log_cli_level=INFO tests/integration -k "core" --alluredir=allure-results
8856
89-
- name: Stop container
90-
if: always()
91-
run: |
92-
docker compose -f "$DOCKER_COMPOSE_FILE" down
93-
9457
# Need to pull the pages branch in order to fetch the previous runs
9558
- name: Get Allure history
9659
uses: actions/checkout@v4

0 commit comments

Comments
 (0)