Skip to content

Commit

Permalink
revert formatting changes in integration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Nov 17, 2024
1 parent 5869413 commit 06b5c33
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,23 @@ jobs:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate-matrix.outputs.result }}

steps:
- if: github.event_name != 'pull_request_target'
- name: Check out the repository (non-PR)
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v4
with:
persist-credentials: false
- if: github.event_name == 'pull_request_target'

- name: Check out the repository (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- if: github.event_name == 'pull_request_target'

- name: Check if relevant files changed
if: github.event_name == 'pull_request_target'
# https://github.com/marketplace/actions/paths-changes-filter
# For each filter, it sets output variable named by the filter to the text:
# 'true' - if any of changed files matches any of filter rules
Expand All @@ -115,7 +121,8 @@ jobs:
- 'tests/**'
- 'pyproject.toml'
- '*.py'
- id: generate-matrix
- name: Generate integration test matrix
id: generate-matrix
uses: actions/github-script@v7
env:
CHANGES: ${{ steps.get-changes.outputs.changes }}
Expand All @@ -140,41 +147,57 @@ jobs:
)
runs-on: ${{ matrix.os }}
needs: test-metadata

strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.test-metadata.outputs.matrix) }}

env:
DBT_INVOCATION_ENV: github-actions
DD_CIVISIBILITY_AGENTLESS_ENABLED: true
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DD_SITE: datadoghq.com
DD_ENV: ci
DD_SERVICE: ${{ github.event.repository.name }}

steps:
- if: github.event_name == 'push'
- name: Check out the repository
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
persist-credentials: false
- if: github.event_name == 'workflow_dispatch'

- name: Check out the repository (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ inputs.adapter_branch }}
- if: github.event_name == 'pull_request_target'

# explicitly checkout the branch for the PR,
# this is necessary for the `pull_request_target` event
- name: Check out the repository (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- if: ${{ github.event_name == 'workflow_dispatch' }}

- name: Set up Python ${{ matrix.python-version }}
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
./.github/scripts/update_dev_dependency_branches.sh \
${{ inputs.dbt_adapters_branch }} \
${{ inputs.dbt_core_branch }} \
${{ inputs.dbt_common_branch }}
cat hatch.toml
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: pypa/hatch@install

- run: hatch run integration-tests
env:
SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.SNOWFLAKE_TEST_ACCOUNT }}
Expand All @@ -197,9 +220,12 @@ jobs:

require-label-comment:
runs-on: ubuntu-latest

needs: test

permissions:
pull-requests: write

steps:
- if: >-
needs.test.result == 'skipped' &&
Expand Down

0 comments on commit 06b5c33

Please sign in to comment.