Skip to content

Commit

Permalink
Fix the issue on the working directory (#36)
Browse files Browse the repository at this point in the history
* Fix the issue on the working directory

* Trigger test
  • Loading branch information
yu-iskw authored Jun 23, 2022
1 parent 6879337 commit cd06010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ if [[ "${changed_files}" == "" ]]; then
fi
echo '::endgroup::'

# Change the working directory
if [[ "x${INPUT_WORKING_DIRECTORY}" != "x" ]]; then
cd "$INPUT_WORKING_DIRECTORY"
fi

# Install sqlfluff
echo '::group::🐶 Installing sqlfluff ... https://github.com/sqlfluff/sqlfluff'
pip install --no-cache-dir -r "${SCRIPT_DIR}/requirements/requirements.txt"
Expand All @@ -51,7 +46,10 @@ echo '::endgroup::'
# Install dbt packages
echo '::group:: Installing dbt packages'
if [[ -f "${INPUT_WORKING_DIRECTORY}/packages.yml" ]]; then
defulat_dir="$(pwd)"
cd "$INPUT_WORKING_DIRECTORY"
dbt deps --profiles-dir "${SCRIPT_DIR}/resources/dummy_profiles"
cd "$defulat_dir"
fi
echo '::endgroup::'

Expand Down
2 changes: 1 addition & 1 deletion testdata/test_failed_dbt/models/staging/staging_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

SELECT
1 AS x,
2 AS y,
2 AS y,
3 AS z

0 comments on commit cd06010

Please sign in to comment.