-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testing framework, CI, and make post-commands optional (#6)
* Spike out CI workflow yml * Spike out pytest and fixtures * Fix duplication of slug logic in copier.yml * Quote new jinja project_slug in copier.yml * Resotre README bit that was lost again * Expand README with CLI recs and learning resources * Make disclaimer about me working at dbt a footnote * Fix footnote disclaimer formatting * Fix wording of disclaimer footnote * Amended: profiles integration test working; rm'd test-build from git * Integration tests working for BQ, SF, DDB * Expand README re command optionality * Move dev-requirements files to project root, update CI.yml * Capitalize CI in workflow name * Expand template exclude list to include dev-reqs * Compile requirements before installing in CI * Compile requirements before installing in CI corrected to dev-requirements * Fix copier.yml from wonky merge * Ensure tests are running copier state from HEAD * Simplify CI matrix to py 3.10 macos for now * Make 3.10 a string in ci.yml
- Loading branch information
1 parent
ee73e0b
commit 77910e4
Showing
11 changed files
with
371 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branch: main | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
os: [macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout PR branch | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install uv and requirements | ||
run: | | ||
python -m pip install uv | ||
uv pip compile dev-requirements.in -o dev-requirements.txt | ||
uv pip install -r dev-requirements.txt --system | ||
- name: Run integration tests | ||
run: pytest template-integration-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.venv | ||
__pycache__ | ||
template-integration-tests/test-build | ||
.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytest | ||
copier | ||
deepdiff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile template-integration-tests/dev-requirements.in -o template-integration-tests/dev-requirements.txt | ||
annotated-types==0.6.0 | ||
# via pydantic | ||
colorama==0.4.6 | ||
# via copier | ||
copier==9.1.1 | ||
decorator==5.1.1 | ||
# via copier | ||
dunamai==1.19.2 | ||
# via copier | ||
exceptiongroup==1.2.0 | ||
# via pytest | ||
funcy==2.0 | ||
# via copier | ||
iniconfig==2.0.0 | ||
# via pytest | ||
jinja2==3.1.3 | ||
# via | ||
# copier | ||
# jinja2-ansible-filters | ||
jinja2-ansible-filters==1.3.2 | ||
# via copier | ||
markupsafe==2.1.5 | ||
# via jinja2 | ||
packaging==23.2 | ||
# via | ||
# copier | ||
# dunamai | ||
# pytest | ||
pathspec==0.12.1 | ||
# via copier | ||
pluggy==1.4.0 | ||
# via pytest | ||
plumbum==1.8.2 | ||
# via copier | ||
prompt-toolkit==3.0.36 | ||
# via questionary | ||
pydantic==2.6.3 | ||
# via copier | ||
pydantic-core==2.16.3 | ||
# via pydantic | ||
pygments==2.17.2 | ||
# via copier | ||
pytest==8.1.0 | ||
pyyaml==6.0.1 | ||
# via | ||
# copier | ||
# jinja2-ansible-filters | ||
# pyyaml-include | ||
pyyaml-include==1.3.2 | ||
# via copier | ||
questionary==2.0.1 | ||
# via copier | ||
tomli==2.0.1 | ||
# via pytest | ||
typing-extensions==4.10.0 | ||
# via | ||
# pydantic | ||
# pydantic-core | ||
wcwidth==0.2.13 | ||
# via prompt-toolkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
template-integration-tests/test-expectations/bigquery_profile.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
legoalas_corp: | ||
target: dev | ||
outputs: | ||
dev: | ||
type: bigquery | ||
project: mirkwood | ||
dataset: archers | ||
method: oauth | ||
threads: 8 |
10 changes: 10 additions & 0 deletions
10
template-integration-tests/test-expectations/duckdb_profile.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
lothlorien_enterprises: | ||
target: dev | ||
outputs: | ||
dev: | ||
type: duckdb | ||
path: ./lothlorien.db | ||
database: mallorn | ||
schema: flets | ||
threads: 8 |
13 changes: 13 additions & 0 deletions
13
template-integration-tests/test-expectations/snowflake_profile.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
aragorn_inc: | ||
target: dev | ||
outputs: | ||
dev: | ||
type: snowflake | ||
account: | ||
user: strider | ||
authenticator: externalbrowser | ||
database: gondor | ||
warehouse: narsil | ||
schema: rangers | ||
threads: 8 |
Oops, something went wrong.