Skip to content

Commit 2944b5e

Browse files
committed
commit changes to break into separate prs
1 parent c30dd66 commit 2944b5e

13 files changed

+157
-372
lines changed

.github/workflows/backport.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ on:
1919
- labeled
2020

2121
permissions:
22-
23-
pull-requests: write# to create the PR
22+
pull-requests: write # to create the PR
2423
contents: write # to create the comment if the process fails
2524

2625
jobs:

.github/workflows/bot-changelog.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# - create a `changie` entry for automated PRs using this template:
33
#
44
# kind: <per action matrix> (e.g. Dependencies)
5-
# body: <PR title>
6-
# time: <current timestamp>
7-
# custom:
8-
# Author: <PR User Login (generally the bot)>
9-
# PR: <PR number>
5+
# body: <PR title>
6+
# time: <current timestamp>
7+
# custom:
8+
# Author: <PR User Login (generally the bot)>
9+
# PR: <PR number>
1010
#
1111
# **why?**
1212
# - automate and standardize `changie` entry generation for automated PRs

.github/workflows/build-artifacts.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/clean-repo.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/code-quality.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

.github/workflows/integration-tests.yml renamed to .github/workflows/dev-branch-integration-tests.yml

Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
name: "Integration tests"
1+
name: "Dev branch integration tests"
22

33
on:
4-
pull_request_target:
5-
push:
6-
branches:
7-
- "main"
8-
- "*.latest"
9-
workflow_call:
10-
inputs:
11-
branch:
12-
description: "The branch/tag to run integration tests on"
13-
type: string
14-
default: "main"
15-
dbt-adapters-branch:
16-
description: "The branch/tag of `dbt-adapters` to use"
17-
type: string
18-
default: "main"
19-
dbt-common-branch:
20-
description: "The branch/tag of `dbt-common` to use"
21-
type: string
22-
default: "main"
23-
dbt-core-branch:
24-
description: "The branch/tag of `dbt-core` to use"
25-
type: string
26-
default: "main"
274
workflow_dispatch:
285
inputs:
296
branch:
@@ -46,7 +23,7 @@ on:
4623
permissions: read-all
4724

4825
concurrency:
49-
group: "${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}"
26+
group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.sha }}"
5027
cancel-in-progress: true
5128

5229
jobs:
@@ -67,7 +44,7 @@ jobs:
6744
with:
6845
msg: |
6946
"Thanks for your contribution! "\
70-
"Since this is a fork, integration tests need to be approved prior to running. "\
47+
"This PR was created from a fork, integration tests need to be approved prior to running. "\
7148
"@dbt-labs/core will review this PR and approve running integration tests."
7249
check_for_duplicate_msg: true
7350

@@ -115,7 +92,7 @@ jobs:
11592
ref: ${{ github.event.pull_request.head.sha }}
11693

11794
- name: "Setup environment"
118-
uses: dbt-labs/dbt-adapters/.github/actions/setup-environment@update-workflows
95+
uses: dbt-labs/actions/setup-environment@add-hatch-actions
11996
with:
12097
python-version: ${{ matrix.python-version }}
12198

@@ -132,14 +109,28 @@ jobs:
132109
run: hatch run integration-tests:all
133110

134111
aggregate-results:
135-
name: "Successful integration tests"
112+
name: "Collect integration tests results"
136113
needs: integration-tests
137-
if: ${{ !failure() && !cancelled() }}
114+
if: always() && !cancelled()
138115
runs-on: ubuntu-latest
139116
steps:
140-
- name: "Integration tests completed successfully"
117+
- name: "[INFO] Integration tests - FAILED"
118+
if: failure()
141119
shell: bash
142120
run: |
143-
title="Integration tests"
144-
message="Integration tests completed successfully!"
145-
echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message"
121+
echo "::notice title=[$WORKFLOW]: $TITLE::$MESSAGE"
122+
exit 1
123+
env:
124+
WORKFLOW: ${{ env.NOTIFICATION_PREFIX }}
125+
TITLE: "Integration tests - FAILED"
126+
MESSAGE: "Integration tests failed!"
127+
128+
- name: "[INFO] Integration tests - PASSED"
129+
if: ${{ !failure() }} # includes skipped
130+
shell: bash
131+
run: |
132+
echo "::notice title=[$WORKFLOW]: $TITLE::$MESSAGE"
133+
env:
134+
WORKFLOW: ${{ env.NOTIFICATION_PREFIX }}
135+
TITLE: "Integration tests - PASSED"
136+
MESSAGE: "Integration tests completed successfully!"

.github/workflows/changelog-check.yml renamed to .github/workflows/pull-request-changelog-check.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# - labels are updated on the PR
1717
# - new code is pushed to the branch
1818
# The action will get skipped if the 'Skip Changelog' label is present.
19-
name: Check Changelog Entry
19+
name: "Changelog check"
2020

2121
on:
2222
pull_request:
@@ -26,7 +26,6 @@ on:
2626
- labeled
2727
- unlabeled
2828
- synchronize
29-
workflow_dispatch:
3029

3130
defaults:
3231
run:
@@ -42,5 +41,4 @@ jobs:
4241
with:
4342
changelog_comment: "Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the [dbt-redshift contributing guide](https://github.com/dbt-labs/dbt-redshift/blob/main/CONTRIBUTING.md)."
4443
skip_label: "Skip Changelog"
45-
# this is only acceptable because we own the action we're calling
4644
secrets: inherit
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Pull request checks"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
permissions: read-all
10+
11+
concurrency:
12+
group: "${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.head.ref }}"
13+
cancel-in-progress: true
14+
15+
jobs:
16+
code-quality:
17+
name: "Run code quality"
18+
uses: dbt-labs/actions/.github/workflows/code-quality.yml
19+
with:
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
check-command: "hatch run code-quality"
22+
python-version: ${{ vars.DBT_TEST_PYTHON_VERSION }}
23+
24+
unit-tests:
25+
name: "Run unit tests"
26+
uses: dbt-labs/actions/.github/workflows/unit-tests.yml
27+
with:
28+
ref: ${{ github.event.pull_request.head.ref }}
29+
test-command: "hatch run unit-tests:all"
30+
python-versions: ${{ vars.DBT_TEST_PYTHON_ALL_VERSIONS }}
31+
32+
integration-tests:
33+
name: "Run unit tests"
34+
uses: dbt-labs/actions/.github/workflows/integration-tests.yml
35+
with:
36+
ref: ${{ github.event.pull_request.head.ref }}
37+
test-command: "hatch run integration-tests:all"
38+
python-versions-ubuntu: ${{ vars.DBT_TEST_PYTHON_ALL_VERSIONS }}
39+
python-versions-macos: ${{ vars.DBT_TEST_PYTHON_VERSION }}
40+
python-versions-windows: ${{ vars.DBT_TEST_PYTHON_VERSION }}
41+
42+
verify-build-artifacts:
43+
name: "Verify build artifacts"
44+
uses: dbt-labs/actions/.github/workflows/build-artifacts.yml@add-hatch-actions

0 commit comments

Comments
 (0)