Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding yamlfix formatter #143

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions .github/workflows/changelog-entry-check.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
name: Changelog entry check

on:
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize

defaults:
run:
shell: bash
run:
shell: bash

permissions:
contents: read
pull-requests: write
contents: read
pull-requests: write

jobs:
changelog-entry-check:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
with:
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-postgres contributing guide](https://github.com/dbt-labs/dbt-postgres/blob/main/CONTRIBUTING.md).
skip_label: "Skip Changelog"
secrets: inherit
changelog-entry-check:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
with:
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-postgres contributing guide](https://github.com/dbt-labs/dbt-postgres/blob/main/CONTRIBUTING.md).
skip_label: "Skip Changelog"
secrets: inherit
6 changes: 4 additions & 2 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ permissions: read-all

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name,
'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true

jobs:
Expand All @@ -40,7 +41,8 @@ jobs:
- name: Update Adapters and Core branches
if: ${{ contains(github.event_name, 'workflow_') }}
shell: bash
run: ./.github/scripts/update_dev_packages.sh ${{ inputs.dbt_adapters_branch }} "main"
run: ./.github/scripts/update_dev_packages.sh ${{ inputs.dbt_adapters_branch }}
"main"

- name: Setup `hatch`
uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/docs-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@
# **when?**
# When an issue is labeled `user docs` and is closed as completed. Can be labeled before or after the issue is closed.


name: Open issues in docs.getdbt.com repo when an issue is labeled
run-name: "Open an issue in docs.getdbt.com for issue #${{ github.event.issue.number }}"

on:
issues:
types: [labeled, closed]
types:
- labeled
- closed

defaults:
run:
shell: bash

permissions:
issues: write # comments on issues
issues: write # comments on issues

jobs:
open_issues:
Expand All @@ -35,7 +36,9 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'user docs'))
uses: dbt-labs/actions/.github/workflows/open-issue-in-repo.yml@main
with:
issue_repository: "dbt-labs/docs.getdbt.com"
issue_title: "Docs Changes Needed from ${{ github.event.repository.name }} Issue #${{ github.event.issue.number }}"
issue_body: "At a minimum, update body to include a link to the page on docs.getdbt.com requiring updates and what part(s) of the page you would like to see updated."
issue_repository: "dbt-labs/docs.getdbt.com"
issue_title: "Docs Changes Needed from ${{ github.event.repository.name }} Issue\
\ #${{ github.event.issue.number }}"
issue_body: "At a minimum, update body to include a link to the page on docs.getdbt.com\
\ requiring updates and what part(s) of the page you would like to see updated."
secrets: inherit
22 changes: 17 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Integration Tests

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 }}"
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 }}"

on:
push:
Expand Down Expand Up @@ -67,7 +69,8 @@ permissions: read-all

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name,
'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true

defaults:
Expand All @@ -82,7 +85,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

services:
postgres:
Expand Down Expand Up @@ -147,8 +155,12 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, macos-12]
python-version: ["3.8", "3.12"]
platform:
- ubuntu-22.04
- macos-12
python-version:
- "3.8"
- "3.12"
steps:
- name: "Check out repository"
uses: actions/checkout@v4
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ on:
default: "3.12"

permissions:
contents: write # this is the permission that allows creating a new release
contents: write # this is the permission that allows creating a new release

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: "${{ github.workflow }}-${{ github.event_name }}-${{ inputs.version }}-${{ inputs.deploy-to }}"
group: "${{ github.workflow }}-${{ github.event_name }}-${{ inputs.version }}-${{\
\ inputs.deploy-to }}"
cancel-in-progress: true

jobs:
Expand All @@ -49,7 +50,8 @@ jobs:
outputs:
archive-name: ${{ steps.archive.outputs.name }}
steps:
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-prep.outputs.release-branch }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-prep.outputs.release-branch\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ needs.release-prep.outputs.release-branch }}
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
# 1. Bump the version if it has not been bumped
# 2. Generate the changelog (via changie) if there is no markdown file for this version
name: "Release prep"
run-name: "Release prep: Generate changelog and bump to ${{ inputs.version }} for release to ${{ inputs.deploy-to }}"
run-name: "Release prep: Generate changelog and bump to ${{ inputs.version }} for\
\ release to ${{ inputs.deploy-to }}"

on:
workflow_call:
inputs:
Expand Down Expand Up @@ -59,7 +61,8 @@ on:
description: "The SHA to be released"
value: ${{ jobs.release.outputs.sha }}
changelog-path:
description: "The path to the changelog from the repo root for this version, e.g. .changes/1.8.0-b1.md"
description: "The path to the changelog from the repo root for this version,\
\ e.g. .changes/1.8.0-b1.md"
value: ${{ jobs.release-inputs.outputs.changelog-path }}
secrets:
FISHTOWN_BOT_PAT:
Expand Down Expand Up @@ -165,8 +168,8 @@ jobs:
runs-on: ubuntu-latest
needs: release-inputs
if: |
needs.release-inputs.outputs.changelog-exists == 'false' ||
needs.release-inputs.outputs.version-is-current == 'false'
needs.release-inputs.outputs.changelog-exists == 'false' ||
needs.release-inputs.outputs.version-is-current == 'false'
outputs:
name: ${{ steps.release-branch.outputs.name }}

Expand Down Expand Up @@ -218,7 +221,8 @@ jobs:
- core-team

steps:
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ needs.release-branch.outputs.name }}
Expand All @@ -243,7 +247,7 @@ jobs:
changie batch ${{ needs.release-inputs.outputs.base-version }} \
--include '${{ needs.release-inputs.outputs.base-version }}' \
--remove-prereleases
else # releasing a final patch with no pre-releases
else # releasing a final patch with no pre-releases
changie batch ${{ needs.release-inputs.outputs.base-version }}
fi
changie merge
Expand Down Expand Up @@ -291,7 +295,8 @@ jobs:
- generate-changelog

steps:
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ needs.release-branch.outputs.name }}
Expand Down Expand Up @@ -333,7 +338,8 @@ jobs:
- bump-version

steps:
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ needs.release-branch.outputs.name }}
Expand Down Expand Up @@ -369,7 +375,8 @@ jobs:
- 5432:5432

steps:
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ needs.release-branch.outputs.name\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ needs.release-branch.outputs.name }}
Expand Down Expand Up @@ -404,9 +411,9 @@ jobs:
- release-branch
- release-inputs
if: |
!failure() && !cancelled() &&
needs.release-branch.result == 'success' &&
inputs.deploy-to == 'prod'
!failure() && !cancelled() &&
needs.release-branch.result == 'success' &&
inputs.deploy-to == 'prod'

steps:
- name: "Checkout ${{ github.event.repository.name }}"
Expand All @@ -418,7 +425,8 @@ jobs:
source_ref: ${{ needs.release-branch.outputs.name }}
target_branch: ${{ inputs.branch }}
github_token: ${{ secrets.FISHTOWN_BOT_PAT }}
commit_message_template: "[Automated] Merged {source_ref} into target {target_branch} during release process"
commit_message_template: "[Automated] Merged {source_ref} into target {target_branch}\
\ during release process"

- name: "[INFO] Merge changes into ${{ inputs.branch }}"
run: |
Expand Down Expand Up @@ -454,7 +462,8 @@ jobs:
fi
echo "name=$branch" >> $GITHUB_OUTPUT

- name: "Checkout ${{ github.event.repository.name }}@${{ steps.branch.outputs.name }}"
- name: "Checkout ${{ github.event.repository.name }}@${{ steps.branch.outputs.name\
\ }}"
uses: actions/checkout@v4
with:
ref: ${{ steps.branch.outputs.name }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Once a day

name: "Close stale issues and PRs"

on:
schedule:
- cron: "30 1 * * *"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ permissions: read-all

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name,
'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true

jobs:
Expand All @@ -23,7 +24,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:
- name: Check out repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ on:
workflow_dispatch:
inputs:
version_number:
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
required: true
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
required: true

jobs:
version_bump_and_changie:
Expand Down
Loading
Loading