Skip to content

Commit

Permalink
Try a different quoting scheme for RUN_CMD and TEST_CMD in build_and_…
Browse files Browse the repository at this point in the history
…test_dbt workflow
  • Loading branch information
jeancochrane committed Aug 3, 2023
1 parent 0607be7 commit 98a42ef
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build_and_test_dbt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
- name: Install dbt requirements
uses: ./.github/actions/install_dbt_requirements

- name: Test dbt installation
run: dbt --help
working-directory: ${{ env.PROJECT_DIR }}

- name: Load environment variables
uses: ./.github/actions/load_environment_variables

Expand Down Expand Up @@ -69,17 +65,17 @@ jobs:
name: Set command args to build/test modified resources
run: |
{
echo "RUN_CMD='dbt run --target $TARGET -s state:modified --state target/'";
echo "TEST_CMD='dbt test --target $TARGET -s state:modified --state target/'";
echo "RUN_CMD=dbt\ run\ --target\ $TARGET\ -s\ state:modified\ --state\ target/";
echo "TEST_CMD=dbt\ test\ --target\ $TARGET\ -s\ state:modified\ --state\ target/";
} >> "$GITHUB_ENV"
shell: bash

- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: Set command args to build/test all resources
run: |
{
echo "RUN_CMD='dbt run --target $TARGET'";
echo "TEST_CMD='dbt test --target $TARGET'";
echo "RUN_CMD=dbt\ run\ --target\ $TARGET";
echo "TEST_CMD=dbt\ test\ --target\ $TARGET";
} >> "$GITHUB_ENV"
shell: bash

Expand All @@ -89,11 +85,11 @@ jobs:
shell: bash

- name: Build models
run: $RUN_CMD
run: ${{ env.RUN_CMD }}
working-directory: ${{ env.PROJECT_DIR }}
shell: bash

- name: Test models
run: $TEST_CMD
run: ${{ env.TEST_CMD }}
working-directory: ${{ env.PROJECT_DIR }}
shell: bash

0 comments on commit 98a42ef

Please sign in to comment.