Skip to content

Commit

Permalink
modified testing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ieaves committed Mar 12, 2024
1 parent e667d64 commit 820a8f9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/integration-cube-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- 5434:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 15
cube_api:
cubeapi:
image: cubejs/cube:latest
ports:
- 4000:4000
Expand Down Expand Up @@ -105,5 +105,10 @@ jobs:
HOST: grai-db
run: |
bash init-db.sh
- run: poetry install
- run: poetry run pytest

- name: Run Cube Tests
env:
CUBE_API_URL: "http://cubeapi:4000"
run: poetry run pytest
1 change: 1 addition & 0 deletions .github/workflows/integration-postgres-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 15
steps:
- uses: actions/checkout@v4

- name: Set up Postgres db
working-directory: ${{ env.project_dir }}/dev-database
env:
Expand Down
3 changes: 2 additions & 1 deletion grai-integrations/source-cube/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def cloud_integration(cloud_config, mock_source) -> Optional[CubeIntegration]:

@pytest.fixture(scope="session")
def local_config() -> CubeApiConfig:
return CubeApiConfig(api_url="http://localhost:4000/cubejs-api/v1", api_secret="secret")
api_url = os.environ.get("TESTING_CUBE_API_URL", "http://localhost:4000/cubejs-api/v1")
return CubeApiConfig(api_url=api_url, api_secret="secret")


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 820a8f9

Please sign in to comment.