Skip to content

Commit

Permalink
Cache pip dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Dec 18, 2024
1 parent eeaba0f commit a407ff2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/tests-dbt-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ name: Build and Test DBT Version
on:
workflow_call:
inputs:
dbt-version:
python-version:
required: true
type: string

jobs:
test-dbt-version:
test-dbt-python:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
dbt-version: [ "1.6", "1.7", "1.8", "1.9" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
dbt-version: ${{ inputs.dbt-version }}
python-version: ${{ inputs.python-version }}
dbt-version: ${{ matrix.dbt-version }}
cache: 'pip' # caching pip dependencies
- name: Build & Install DBT ${{ inputs.dbt-version }}
- name: Build & Install DBT ${{ matrix.dbt-version }}
run: |
pip install -q coverage pylint
pip install -q dbt-core==${{ inputs.dbt-version }}.* dbt-duckdb==${{ inputs.dbt-version }}.* --force-reinstall --upgrade
pip install -q dbt-core==${{ matrix.dbt-version }}.* dbt-duckdb==${{ matrix.dbt-version }}.* --force-reinstall --upgrade
# FIX for protobuf issue: https://github.com/dbt-labs/dbt-core/issues/9759
pip install -q "apache-airflow" "protobuf>=4.25.3,<5.0.0" "opentelemetry-proto<1.28.0" --prefer-binary
pip install -q .[test] --prefer-binary
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ on:
- '.run/**'

jobs:
test-dbt-1-6:
uses: ./.github/workflows/tests-dbt-version.yml
test-dbt-3-9:
uses: ./.github/workflows/tests-dbt-python.yml
with:
dbt-version: "1.6"
test-dbt-1-7:
uses: ./.github/workflows/tests-dbt-version.yml
python-version: "3.9"
test-dbt-3-10:
uses: ./.github/workflows/tests-dbt-python.yml
with:
dbt-version: "1.7"
needs: test-dbt-1-6
test-dbt-1-8:
uses: ./.github/workflows/tests-dbt-version.yml
python-version: "3.10"
needs: test-dbt-3-9
test-dbt-3-11:
uses: ./.github/workflows/tests-dbt-python.yml
with:
dbt-version: "1.8"
needs: test-dbt-1-7
test-dbt-1-9:
uses: ./.github/workflows/tests-dbt-version.yml
python-version: "3.11"
needs: test-dbt-3-10
test-dbt-3-12:
uses: ./.github/workflows/tests-dbt-python.yml
with:
dbt-version: "1.9"
needs: test-dbt-1-8
python-version: "3.12"
needs: test-dbt-3-11

0 comments on commit a407ff2

Please sign in to comment.