diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d98bf91ef..f9b0ef48a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -151,7 +151,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit + id: dbt-core-version + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -159,13 +162,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox (redshift) if: matrix.adapter == 'redshift' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8026befda..442184738 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit + id: dbt-core-version + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -101,13 +104,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b0c53e7..4958107e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Fix table creation statement ordering when including both the BACKUP parameter as well as the dist/sort keys ([#23](https://github.com/dbt-labs/dbt-redshift/issues/60)) - Add unique\_id field to docs generation test catalogs; a follow-on PR to core PR ([#4168](https://github.com/dbt-labs/dbt-core/pull/4618)) and core PR ([#4701](https://github.com/dbt-labs/dbt-core/pull/4701)) +### Under the hood +- install compatible branch of dbt-core in unit/integration tests based on merge target ([#80](https://github.com/dbt-labs/dbt-redshift/pull/80)) + ## dbt-redshift 1.0.0 (December 3, 2021) ## dbt-redshift 1.0.0rc2 (November 24, 2021)