-
Notifications
You must be signed in to change notification settings - Fork 101
81 lines (77 loc) · 2.97 KB
/
_integration-tests.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
name: "Integration tests"
on:
workflow_call:
inputs:
package:
description: "Choose the package to test"
type: string
default: "dbt-athena"
branch:
description: "Choose the branch to test"
type: string
default: "main"
repository:
description: "Choose the repository to test, when using a fork"
type: string
default: "dbt-labs/dbt-athena"
os:
description: "Choose the OS to test against"
type: string
default: ${{ vars.DEFAULT_RUNNER }}
python-version:
description: "Choose the Python version to test against"
type: string
default: ${{ vars.DEFAULT_PYTHON_VERSION }}
workflow_dispatch:
inputs:
package:
description: "Choose the package to test"
type: choice
options: ["dbt-athena", "dbt-athena-community"]
branch:
description: "Choose the branch to test"
type: string
default: "main"
repository:
description: "Choose the repository to test, when using a fork"
type: string
default: "dbt-labs/dbt-athena"
os:
description: "Choose the OS to test against"
type: string
default: ${{ vars.DEFAULT_RUNNER }}
python-version:
description: "Choose the Python version to test against"
type: choice
options: ["3.9", "3.10", "3.11", "3.12"]
permissions:
id-token: write
contents: read
env:
DBT_TEST_ATHENA_S3_STAGING_DIR: ${{ vars.DBT_TEST_ATHENA_S3_BUCKET }}/staging/
DBT_TEST_ATHENA_S3_TMP_TABLE_DIR: ${{ vars.DBT_TEST_ATHENA_S3_BUCKET }}/tmp_tables/
DBT_TEST_ATHENA_REGION_NAME: ${{ vars.DBT_TEST_ATHENA_REGION_NAME }}
DBT_TEST_ATHENA_DATABASE: awsdatacatalog
DBT_TEST_ATHENA_SCHEMA: dbt-tests
DBT_TEST_ATHENA_WORK_GROUP: athena-dbt-tests
DBT_TEST_ATHENA_THREADS: 16
DBT_TEST_ATHENA_POLL_INTERVAL: 0.5
DBT_TEST_ATHENA_NUM_RETRIES: 3
jobs:
integration-tests:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
repository: ${{ inputs.repository }}
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- uses: pypa/hatch@install
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.ASSUMABLE_ROLE_NAME }}
aws-region: ${{ vars.DBT_TEST_ATHENA_REGION_NAME }}
- run: hatch run integration-tests
working-directory: ./${{ inputs.package }}