Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
agnessnowplow committed Dec 10, 2024
1 parent 47eae75 commit 17c1b67
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ jobs:
- name: Get branch name
id: vars
# This needs surfaced for below 'run unit tests' step which may run on specific branch only
run:
run: |
if [ "${{ github.base_ref }}" = "main" ]; then
echo "BRANCH=release" >> $GITHUB_ENV
echo "BRANCH='release'" >> $GITHUB_ENV
else
echo "BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
echo "BRANCH='${{ github.head_ref }}'" >> $GITHUB_ENV
fi
- name: Configure Docker credentials
uses: docker/login-action@v2
Expand Down Expand Up @@ -166,12 +166,15 @@ jobs:
run: |
dbt run-operation post_ci_cleanup --target ${{matrix.warehouse}}
- name: Make unit_tests.sh executable
run: chmod +x ./.scripts/unit_tests.sh

- name: Run Unit tests
run: ./.scripts/unit_tests.sh -d ${{matrix.warehouse}} -b ${{ env.BRANCH }}

- name: Run integration tests
run: ./.scripts/integration_tests.sh -d ${{matrix.warehouse}}

- name: "Post-test: Drop ci schemas"
run: |
dbt run-operation post_ci_cleanup --target ${{matrix.warehouse}}
2 changes: 2 additions & 0 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ models:
+enabled: "{{ target.type == 'snowflake' | as_bool() }}"
spark:
+enabled: "{{ target.type == 'spark' | as_bool() }}"
unit_tests:
+materialized: "{{ 'table' if target.type in ['spark'] else 'view' }}"

tests:
snowplow_utils_integration_tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ with prep as (
)

select test_type, element
from prep
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ with data as (

)

select test_type, element from expected
select test_type, element from expected

0 comments on commit 17c1b67

Please sign in to comment.