2020
2121name : Adapter Integration Tests
2222
23+ run-name : " ${{ (contains(github.event_name, 'workflow_') && inputs.name) || github.event_name }}: ${{ (contains(github.event_name, 'workflow_') && inputs.adapter_branch) || github.ref_name }} by @${{ github.actor }}"
24+
2325on :
2426 # pushes to release branches
2527 push :
3436 # manual trigger
3537 workflow_dispatch :
3638 inputs :
37- dbt-core-branch :
38- description : " branch of dbt-core to use in dev-requirements.txt"
39+ name :
40+ description : " Name to associate with run (example: 'dbt-adapters-242')"
41+ required : false
42+ type : string
43+ default : " Adapter Integration Tests"
44+ adapter_branch :
45+ description : " The branch of this adapter repository to use"
46+ type : string
47+ required : false
48+ default : " main"
49+ dbt_adapters_branch :
50+ description : " The branch of dbt-adapters to use"
51+ type : string
52+ required : false
53+ default : " main"
54+ dbt_core_branch :
55+ description : " The branch of dbt-core to use"
56+ type : string
3957 required : false
58+ default : " main"
59+ dbt_common_branch :
60+ description : " The branch of dbt-common to use"
4061 type : string
62+ required : false
63+ default : " main"
4164
4265# explicitly turn off permissions for `GITHUB_TOKEN`
4366permissions : read-all
@@ -67,12 +90,19 @@ jobs:
6790 run-python-tests : ${{ steps.filter.outputs.bigquery-python }}
6891
6992 steps :
70- - name : Check out the repository (non-PR )
71- if : github.event_name != 'pull_request_target '
93+ - name : Check out the repository (push )
94+ if : github.event_name == 'push '
7295 uses : actions/checkout@v4
7396 with :
7497 persist-credentials : false
7598
99+ - name : Check out the repository (workflow_dispatch)
100+ if : github.event_name == 'workflow_dispatch'
101+ uses : actions/checkout@v4
102+ with :
103+ persist-credentials : false
104+ ref : ${{ inputs.adapter_branch }}
105+
76106 - name : Check out the repository (PR)
77107 if : github.event_name == 'pull_request_target'
78108 uses : actions/checkout@v4
@@ -143,12 +173,19 @@ jobs:
143173
144174 steps :
145175 - name : Check out the repository
146- if : github.event_name != 'pull_request_target'
176+ if : github.event_name != 'pull_request_target' && github.event_name != 'workflow_dispatch'
147177 uses : actions/checkout@v4
148178 with :
149179 persist-credentials : false
150180
151- # explicity checkout the branch for the PR,
181+ - name : Check out the repository (workflow_dispatch)
182+ if : github.event_name == 'workflow_dispatch'
183+ uses : actions/checkout@v4
184+ with :
185+ persist-credentials : false
186+ ref : ${{ inputs.adapter_branch }}
187+
188+ # explicitly checkout the branch for the PR,
152189 # this is necessary for the `pull_request_target` event
153190 - name : Check out the repository (PR)
154191 if : github.event_name == 'pull_request_target'
@@ -169,11 +206,14 @@ jobs:
169206 python -m pip --version
170207 tox --version
171208
172- - name : Update dev_requirements.txt
173- if : inputs.dbt-core-branch != ' '
209+ - name : Update Adapters and Core branches (update dev_requirements.txt)
210+ if : github.event_name == 'workflow_dispatch '
174211 run : |
175- pip install bumpversion
176- ./.github/scripts/update_dbt_core_branch.sh ${{ inputs.dbt-core-branch }}
212+ ./.github/scripts/update_dev_dependency_branches.sh \
213+ ${{ inputs.dbt_adapters_branch }} \
214+ ${{ inputs.dbt_core_branch }} \
215+ ${{ inputs.dbt_common_branch }}
216+ cat dev-requirements.txt
177217
178218 - name : Run tox (bigquery)
179219 if : matrix.adapter == 'bigquery'
0 commit comments