Skip to content

Update release workflow #1571

Update release workflow

Update release workflow #1571

name: functional-tests
on:
# we use pull_request_target to run the CI also for forks
pull_request_target:
types: [opened, reopened, synchronize, labeled]
push:
branches: [main]
workflow_dispatch:
inputs:
checkout-ref:
description: "Use this if running on a feature branch"
type: string
default: "main"
checkout-repository:
description: "Use this if running against a fork"
type: string
default: "dbt-labs/dbt-athena"
jobs:
# workflow that is invoked when for PRs with labels 'enable-functional-tests'
functional-tests-pr:
name: Functional Tests - PR
if: github.event_name == 'pull_request'
uses: ./.github/workflows/functional-tests-workflow.yml
strategy:
matrix:
package: ['dbt-athena', 'dbt-athena-community']
secrets: inherit
permissions:
id-token: write
contents: read
with:
checkout-ref: ${{ github.event.pull_request.head.ref }}
# this makes the workflow run on a fork
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
package: ${{ matrix.package }}
# workflow that is invoked when a push to main happens
functional-tests-main:
name: Functional Tests - main
if: github.event_name == 'push'
uses: ./.github/workflows/functional-tests-workflow.yml
strategy:
matrix:
package: ['dbt-athena', 'dbt-athena-community']
secrets: inherit
permissions:
id-token: write
contents: read
with:
checkout-ref: ${{ github.ref }}
checkout-repository: ${{ github.repository }}
package: ${{ matrix.package }}
# workflow that is invoked when run manually in GitHub
functional-tests-dispatch:
name: Functional Tests - dispatch
if: github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/functional-tests-workflow.yml
strategy:
matrix:
package: ['dbt-athena', 'dbt-athena-community']
secrets: inherit
permissions:
id-token: write
contents: read
with:
checkout-ref: ${{ inputs.checkout-ref }}
checkout-repository: ${{ inputs.checkout-repository }}
package: ${{ matrix.package }}