Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Sep 1, 2023
1 parent 5d3e511 commit 6a4b248
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Test Cosmos against Airflow ${{ matrix.airflow-version }} and Python ${{ matrix.python-version }}
run: |
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-expensive-setup
hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-setup
DATABRICKS_UNIQUE_ID="${{github.run_id}}" hatch run tests.py${{ matrix.python-version }}-${{ matrix.airflow-version }}:test-integration-expensive
env:
AIRFLOW_HOME: /home/runner/work/astronomer-cosmos/astronomer-cosmos/
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ test-cov = 'pytest -vv --cov=cosmos --cov-report=term-missing --cov-report=xml -
test-integration-setup = """pip uninstall dbt-postgres dbt-databricks dbt-sqlite; \
rm -rf airflow.*; \
airflow db init; \
pip install 'dbt-postgres<=1.5' 'dbt-databricks<=1.5' 'dbt-sqlite'"""
test-integration-expensive-setup = """pip uninstall dbt-postgres dbt-databricks dbt-sqlite<=1.4; \
rm -rf airflow.*; \
airflow db init; \
pip install 'dbt-postgres<=1.4' 'dbt-databricks<=1.4' 'dbt-sqlite<=1.4'"""
test-integration = """rm -rf dbt/jaffle_shop/dbt_packages;
pytest -vv \
Expand Down
10 changes: 3 additions & 7 deletions tests/dbt/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def test_load_via_dbt_ls_with_exclude():
dbt_project = DbtProject(name="jaffle_shop", root_dir=DBT_PROJECTS_ROOT_DIR)
dbt_graph = DbtGraph(
project=dbt_project,
select=["*customers*"],
exclude=["*orders*"],
select=["customers"],
exclude=["orders"],
profile_config=ProfileConfig(
profile_name="default",
target_name="default",
Expand All @@ -176,15 +176,11 @@ def test_load_via_dbt_ls_with_exclude():

dbt_graph.load_via_dbt_ls()
assert dbt_graph.nodes == dbt_graph.filtered_nodes
assert len(dbt_graph.nodes) == 7
assert len(dbt_graph.nodes) == 3
expected_keys = [
"model.jaffle_shop.customers",
"model.jaffle_shop.stg_customers",
"seed.jaffle_shop.raw_customers",
"test.jaffle_shop.not_null_customers_customer_id.5c9bf9911d",
"test.jaffle_shop.not_null_stg_customers_customer_id.e2cfb1f9aa",
"test.jaffle_shop.unique_customers_customer_id.c5af1ff4b1",
"test.jaffle_shop.unique_stg_customers_customer_id.c7614daada",
]
assert list(dbt_graph.nodes.keys()) == expected_keys

Expand Down

0 comments on commit 6a4b248

Please sign in to comment.