|
1 | 1 | # **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. |
2 | 5 |
|
3 | 6 | # **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. |
4 | 10 |
|
5 | 11 | # **when?**
|
6 | 12 | # This reusable workflow can be called or started manually
|
@@ -29,17 +35,47 @@ permissions:
|
29 | 35 | contents: read # required for slack-post-notification workflow
|
30 | 36 |
|
31 | 37 | jobs:
|
32 |
| - pip-integration-test: |
| 38 | + pip-installation-test: |
33 | 39 | runs-on: ubuntu-latest
|
34 | 40 |
|
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + python-version: ["3.7", "3.8", "3.9", "3.10"] |
| 45 | + |
35 | 46 | 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" |
37 | 73 | run: |
|
38 |
| - echo ${{ inputs.package_name }} |
| 74 | + dbt --version |
39 | 75 |
|
40 | 76 | slack-notification:
|
41 | 77 | name: "Post Scheduled Run Failures"
|
42 |
| - needs: pip-integration-test |
| 78 | + needs: pip-installation-test |
43 | 79 | if: ${{ failure() && github.event_name == 'schedule' }}
|
44 | 80 |
|
45 | 81 | uses: dbt-labs/dbt-release/.github/workflows/slack-post-notification.yml@main
|
|
0 commit comments