-
Notifications
You must be signed in to change notification settings - Fork 101
84 lines (75 loc) · 3.35 KB
/
pull-request-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: "Pull request checks"
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled, unlabeled]
# only run this once per PR at a time
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
changelog-entry:
uses: dbt-labs/dbt-adapters/.github/workflows/_changelog-entry-check.yml@monorepo/shared-workflows
with:
package: "dbt-athena"
issue: ${{ github.event.pull_request.number }}
code-quality:
uses: dbt-labs/dbt-adapters/.github/workflows/_code-quality.yml@monorepo/shared-workflows
with:
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
changelog:
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 contributing guide](https://github.com/dbt-labs/dbt-adapters/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
skip_label: 'Skip Changelog'
secrets: inherit
verify-builds:
uses: dbt-labs/dbt-adapters/.github/workflows/_verify-build.yml@monorepo/shared-workflows
strategy:
matrix:
package: ["dbt-athena", "dbt-athena-community"]
os: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
unit-tests:
uses: dbt-labs/dbt-adapters/.github/workflows/_unit-tests.yml@monorepo/shared-workflows
strategy:
matrix:
package: ["dbt-athena", "dbt-athena-community"]
os: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
integration-tests:
uses: ./.github/workflows/_integration-tests.yml
strategy:
matrix:
package: ["dbt-athena", "dbt-athena-community"]
os: [ubuntu-22.04]
python-version: ["3.9", "3.10", "3.11", "3.12"]
with:
package: ${{ matrix.package }}
branch: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
secrets: inherit
# This job does nothing and is only used for branch protection
results:
name: "Pull request checks"
if: always()
needs: [code-quality, changelog, verify-builds, unit-tests, integration-tests]
runs-on: ${{ vars.DEFAULT_RUNNER }}
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}