Skip to content

Commit 0693c59

Browse files
[CI/CD] Add implementation for test-dbt-installation-pip workflow (#66)
test-dbt-installation-pip: - Added initial implementation; - Updated workflow docs;
1 parent bf7a74d commit 0693c59

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

.github/workflows/test-dbt-installation-pip.yml

+40-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# **what?**
2+
# This workflow installs the latest version of dbt adapter from PyPI.
3+
# It then runs 'dbt --version' to verify the installation was successful.
4+
# If it fails for the scheduled runs, it will post to our team alerts channel.
25

36
# **why?**
7+
# This is a simple way to test all adapter installations at a single
8+
# time. It allows us to test them on a schedule as well to check for
9+
# any breaking dependency changes that might happen and alert us on it.
410

511
# **when?**
612
# This reusable workflow can be called or started manually
@@ -29,17 +35,47 @@ permissions:
2935
contents: read # required for slack-post-notification workflow
3036

3137
jobs:
32-
pip-integration-test:
38+
pip-installation-test:
3339
runs-on: ubuntu-latest
3440

41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version: ["3.7", "3.8", "3.9", "3.10"]
45+
3546
steps:
36-
- name: "Output Package Name - ${{ inputs.package_name }}"
47+
- name: "Set up Python - ${{ matrix.python-version }}"
48+
uses: actions/setup-python@v4
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
52+
- name: "Update Python Packages"
53+
run: |
54+
python -m pip install --user --upgrade pip
55+
56+
- name: "[DEBUG] Show Package Installer Python Version"
57+
run: |
58+
python -m pip --version
59+
60+
- name: "Install Package - ${{ inputs.package_name }}"
61+
run: |
62+
python -m pip install pip ${{ inputs.package_name }}
63+
64+
- name: "[DEBUG] Show Installed Packages"
65+
run: |
66+
python -m pip list
67+
68+
- name: "[DEBUG] Show Package Info - ${{ inputs.package_name }}"
69+
run: |
70+
python -m pip show ${{ inputs.package_name }}
71+
72+
- name: "Verify ${{ inputs.package_name }} Version"
3773
run: |
38-
echo ${{ inputs.package_name }}
74+
dbt --version
3975
4076
slack-notification:
4177
name: "Post Scheduled Run Failures"
42-
needs: pip-integration-test
78+
needs: pip-installation-test
4379
if: ${{ failure() && github.event_name == 'schedule' }}
4480

4581
uses: dbt-labs/dbt-release/.github/workflows/slack-post-notification.yml@main

0 commit comments

Comments
 (0)