Skip to content

Commit 2fef811

Browse files
emmyoopMichelleArk
andauthored
Update dbt-core dependency of dbt-common for testing (#105)
* debugging all the values * update dependency before running tox * fix path, pass in repo * put back final ref output * install tox --------- Co-authored-by: Michelle Ark <[email protected]>
1 parent 753c03f commit 2fef811

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

.github/workflows/ci_dbt_core_testing.yml

+10-26
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,16 @@ jobs:
127127
with:
128128
python-version: "3.11"
129129

130-
- name: "Upgrade pip"
130+
- name: "Upgrade pip, install tox"
131131
run: |
132132
python -m pip install --upgrade pip
133133
python -m pip --version
134+
python -m pip install tox
135+
tox --version
134136
135-
# tox takes care of installing the correct version of dbt-core dependencies but we need to
136-
# install them first s that we can override the dbt-common branch
137-
- name: "Manually install dbt-core dependencies"
137+
- name: "Update dbt-common dependency to ${{ needs.job-prep.outputs.dbt-common-ref }}"
138138
run: |
139-
python -m pip uninstall dbt-common -y
140-
python -m pip install -r dev-requirements.txt -r editable-requirements.txt
141-
142-
# Since the dbt-common dependency is pinned in dev-requirements.txt we need to force update it
143-
# Since tox installs dependencies but doesn't force update, it won't get overridden in the next
144-
# step since the requirements will already be met
145-
- name: "Force update the version of dbt-common@${{ needs.job-prep.outputs.dbt-common-ref }}"
146-
run: |
147-
python -m pip install pip install git+https://github.com/dbt-labs/dbt-common.git@${{ needs.job-prep.outputs.dbt-common-ref }} --force-reinstall
139+
./scripts/update_dev_packages.sh ${{ github.repository.name}} ${{ needs.job-prep.outputs.dbt-common-ref }}
148140
149141
- name: "Run unit tests"
150142
# Doing the check here instead of the top level because this is job a required check, the
@@ -237,24 +229,16 @@ jobs:
237229
if: runner.os == 'Windows'
238230
uses: ./.github/actions/setup-postgres-windows
239231

240-
- name: "Upgrade pip"
232+
- name: "Upgrade pip, install tox"
241233
run: |
242234
python -m pip install --upgrade pip
243235
python -m pip --version
236+
python -m pip install tox
237+
tox --version
244238
245-
# tox takes care of installing the correct version of dbt-core dependencies but we need to
246-
# install them first s that we can override the dbt-common branch
247-
- name: "Manually install dbt-core dependencies"
248-
run: |
249-
python -m pip install -r dev-requirements.txt -r editable-requirements.txt
250-
251-
# Since the dbt-common dependency is pinned in dev-requirements.txt we need to force update it
252-
# Since tox installs dependencies but doesn't force update, it won't get overridden in the next
253-
# step since the requirements will already be met
254-
- name: "Force update the version of dbt-common@${{ needs.job-prep.outputs.dbt-common-ref }}"
239+
- name: "Update dbt-common dependency to ${{ needs.job-prep.outputs.dbt-common-ref }}"
255240
run: |
256-
python -m pip uninstall dbt-common -y
257-
python -m pip install pip install git+https://github.com/dbt-labs/dbt-common.git@${{ needs.job-prep.outputs.dbt-common-ref }} --force-reinstall
241+
./scripts/update_dev_packages.sh ${{ github.repository.name}} ${{ needs.job-prep.outputs.dbt-common-ref }}
258242
259243
- name: "Run Functional tests"
260244
run: tox -- --ddtrace

0 commit comments

Comments
 (0)