Skip to content
31 changes: 29 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
name: Integration tests
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run the tests against'
type: choice
required: true
default: 'dev'
options:
- dev
- staging
workflow_call:
inputs:
environment:
default: 'staging'
required: false
type: string
branch:
required: false
type: string
Expand Down Expand Up @@ -35,13 +48,27 @@ jobs:
python -m pip install --upgrade pip
pip install ".[dev]"

- name: Determine env variables
run: |
if [ "${{ inputs.environment }}" == 'staging' ]; then
echo "USERNAME=${{ secrets.FIREBOLT_USERNAME_STAGING }}" >> "$GITHUB_ENV"
echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD_STAGING }}" >> "$GITHUB_ENV"
echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_STAGING }}" >> "$GITHUB_ENV"
echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_STAGING }}" >> "$GITHUB_ENV"
else
echo "USERNAME=${{ secrets.FIREBOLT_USERNAME_DEV }}" >> "$GITHUB_ENV"
echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD_DEV }}" >> "$GITHUB_ENV"
echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_DEV }}" >> "$GITHUB_ENV"
echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_DEV }}" >> "$GITHUB_ENV"
fi

- name: Setup database and engine
id: setup
uses: firebolt-db/integration-testing-setup@master
with:
firebolt-username: ${{ secrets.FIREBOLT_USERNAME }}
firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }}
api-endpoint: "api.dev.firebolt.io"
api-endpoint: "api.${{ inputs.environment }}.firebolt.io"
region: "us-east-1"

- name: Run integration tests
Expand All @@ -55,7 +82,7 @@ jobs:
ENGINE_URL: ${{ steps.setup.outputs.engine_url }}
STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }}
STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }}
API_ENDPOINT: "api.dev.firebolt.io"
API_ENDPOINT: "api.${{ inputs.environment }}.firebolt.io"
ACCOUNT_NAME: "firebolt"
run: |
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results
Expand Down
6 changes: 3 additions & 3 deletions src/firebolt/async_db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from firebolt.async_db._types import (
from firebolt.async_db.connection import Connection, connect
from firebolt.async_db.cursor import Cursor
from firebolt.common._types import (
ARRAY,
BINARY,
DATETIME,
Expand All @@ -14,8 +16,6 @@
Timestamp,
TimestampFromTicks,
)
from firebolt.async_db.connection import Connection, connect
from firebolt.async_db.cursor import Cursor
from firebolt.utils.exception import (
DatabaseError,
DataError,
Expand Down
Loading