Skip to content

Commit

Permalink
[CI/CD] Add implementation for test-dbt-installation-pip workflow (#66
Browse files Browse the repository at this point in the history
)


test-dbt-installation-pip:
- Added initial implementation;
- Updated workflow docs;
  • Loading branch information
alexander-smolyakov committed Jan 23, 2023
1 parent bf7a74d commit 0693c59
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/test-dbt-installation-pip.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# **what?**
# This workflow installs the latest version of dbt adapter from PyPI.
# It then runs 'dbt --version' to verify the installation was successful.
# If it fails for the scheduled runs, it will post to our team alerts channel.

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

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

jobs:
pip-integration-test:
pip-installation-test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- name: "Output Package Name - ${{ inputs.package_name }}"
- name: "Set up Python - ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: "Update Python Packages"
run: |
python -m pip install --user --upgrade pip
- name: "[DEBUG] Show Package Installer Python Version"
run: |
python -m pip --version
- name: "Install Package - ${{ inputs.package_name }}"
run: |
python -m pip install pip ${{ inputs.package_name }}
- name: "[DEBUG] Show Installed Packages"
run: |
python -m pip list
- name: "[DEBUG] Show Package Info - ${{ inputs.package_name }}"
run: |
python -m pip show ${{ inputs.package_name }}
- name: "Verify ${{ inputs.package_name }} Version"
run: |
echo ${{ inputs.package_name }}
dbt --version
slack-notification:
name: "Post Scheduled Run Failures"
needs: pip-integration-test
needs: pip-installation-test
if: ${{ failure() && github.event_name == 'schedule' }}

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

0 comments on commit 0693c59

Please sign in to comment.