Skip to content

Commit 30288ea

Browse files
added dbt seeds and added separate step to create unit tests schema
1 parent 7475dc1 commit 30288ea

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

tasks/dbt-apply/action.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,28 @@ inputs:
3232
runs:
3333
using: "composite"
3434
steps:
35-
- name: Run DBT
35+
- name: Run DBT without Unit-tets
36+
if: inputs.target != 'unit-test'
3637
shell: bash
3738
run: |
39+
dbt seed --profiles-dir=${{ inputs.profiles-directory }} --target=${{ inputs.target }} --exclude path:seeds/unit_tests
3840
dbt run --profiles-dir=${{ inputs.profiles-directory }} --target=${{ inputs.target }} --exclude tag:daily tag:unit_test
3941
working-directory: ${{ inputs.working-directory }}
42+
env:
43+
snowflake-account: ${{ inputs.snowflake-account }}
44+
snowflake-username: ${{ inputs.snowflake-username }}
45+
snowflake-role: ${{ inputs.snowflake-role }}
46+
snowflake-warehouse: ${{ inputs.snowflake-warehouse }}
47+
snowflake-target-database: ${{ inputs.snowflake-target-database }}
48+
snowflake-password: ${{ inputs.snowflake-password }}
49+
50+
- name: Run DBT with unit-tests
51+
if: inputs.target == 'unit-test'
52+
shell: bash
53+
run: |
54+
dbt seed --profiles-dir=${{ inputs.profiles-directory }} --target=${{ inputs.target }}
55+
dbt run --profiles-dir=${{ inputs.profiles-directory }} --target=${{ inputs.target }} --exclude tag:daily
56+
working-directory: ${{ inputs.working-directory }}
4057
env:
4158
snowflake-account: ${{ inputs.snowflake-account }}
4259
snowflake-username: ${{ inputs.snowflake-username }}

0 commit comments

Comments
 (0)