From 31804b1df3a7d1c1068ca01188a31f5b94ad226d Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Thu, 25 Jan 2024 09:28:41 -0600 Subject: [PATCH] Add CODEOWNERS (#28) * add codeowners * add merge queue logic * link to specific ticket --- .github/CODEOWNERS | 14 ++++++ .github/workflows/build.yml | 2 + .github/workflows/ci_code_quality.yml | 2 + .github/workflows/ci_dbt_core_testing.yml | 53 +++++++++++++++++++++++ .github/workflows/ci_tests.yml | 4 +- 5 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/ci_dbt_core_testing.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..4b02e6a2 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,14 @@ +# This file contains the code owners for the dbt-common repo. +# PRs will be require review from the associated +# team(s) or person(s) that touches any files that are mapped to them. +# +# A statement takes precedence over the statements above it so more general +# assignments are found at the top with specific assignments being lower in +# the ordering (i.e. catch all assignment should be the first item) +# +# Consult GitHub documentation for formatting guidelines: +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file + +# As a default for areas with no assignment, +# the core team as a whole will be assigned +* @dbt-labs/core-team diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 035240f4..5633c4f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ on: branches: - "main" pull_request: + merge_group: + types: [checks_requested] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/ci_code_quality.yml b/.github/workflows/ci_code_quality.yml index b8b33314..cb576640 100644 --- a/.github/workflows/ci_code_quality.yml +++ b/.github/workflows/ci_code_quality.yml @@ -16,6 +16,8 @@ on: branches: - "main" pull_request: + merge_group: + types: [checks_requested] workflow_dispatch: permissions: read-all diff --git a/.github/workflows/ci_dbt_core_testing.yml b/.github/workflows/ci_dbt_core_testing.yml new file mode 100644 index 00000000..37255625 --- /dev/null +++ b/.github/workflows/ci_dbt_core_testing.yml @@ -0,0 +1,53 @@ +# **what?** +# Runs all tests in dbt-core with this branch of dbt-common to ensure nothing is broken + +# **why?** +# Ensure dbt-common changes do nto break dbt-core + +# **when?** +# This will run when trying to merge a PR into main. +# It can also be manually triggered. + +## TODO: This is a stub. It does nothing right now. +# It will be updated in the future as part of https://github.com/dbt-labs/dbt-common/issues/18 + +name: Test Against dbt-core + +on: + merge_group: + types: [checks_requested] + workflow_dispatch: + +permissions: read-all + +defaults: + run: + shell: bash + +jobs: + test-dbt-core: + name: "This does nothing right now - always passes" + + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: "Check out dbt-core" + uses: actions/checkout@v3 + + - name: "Set up Python 3.11" + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: "Update the version of dbt-common" + run: | + echo "Update the version of dbt-common ref'd in dbt-core" + + - name: "Install dbt-core" + run: | + echo "Install dbt-core with updated dbt-common ref" + + - name: "Run Tests" + run: | + echo "Running tests in future versions." diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 87550594..b09c97c4 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -16,6 +16,8 @@ on: branches: - "main" pull_request: + merge_group: + types: [checks_requested] workflow_dispatch: permissions: read-all @@ -48,7 +50,7 @@ jobs: - name: "Set up Python ${{ matrix.python-version }}" uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: "${{ matrix.python-version }}" - name: "Install Hatch" shell: bash