-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
110 additions
and
14 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,96 @@ | ||
version: 2.1 | ||
|
||
|
||
orbs: | ||
slack: circleci/[email protected] | ||
secrethub: secrethub/[email protected] | ||
|
||
commands: | ||
build_test_env: | ||
description: "Build the test environment" | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dbtvault-dev-{{ arch }}-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
- v1-dbtvault-dev-{{ arch }}-{{ .Branch }} | ||
- v1-dbtvault-dev- | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
pipenv install --dev | ||
pipenv install | ||
- save_cache: | ||
key: v1-dbtvault-dev-{{ arch }}-{{ .Branch }}-{{ checksum "Pipfile.lock" }} | ||
paths: | ||
- /.circleci/.cache | ||
- secrethub/install | ||
- run: | ||
name: Install dbt dependencies in test project | ||
command: TARGET=snowflake pipenv run inv run-dbt -u circleci -t snowflake -p test -d 'deps' -e secrethub/secrethub_circleci.env | ||
|
||
jobs: | ||
macros: | ||
docker: | ||
- image: cimg/python:3.8.5 | ||
parallelism: 10 | ||
steps: | ||
- build_test_env | ||
- run: | ||
name: Run snowflake macro tests | ||
command: | | ||
circleci tests glob test_project/unit/*/test_*.py | circleci tests split > /tmp/macro-tests-to-run | ||
TARGET=snowflake pipenv run inv macro-tests -t snowflake -u circleci -e secrethub/secrethub_circleci.env | ||
- slack/status: | ||
fail_only: false | ||
mentions: 'URXTX0XEZ' | ||
- store_test_results: | ||
path: test_results/integration_tests | ||
- store_test_results: | ||
path: test_results/macro_tests | ||
- store_artifacts: | ||
path: test_results/integration_tests | ||
- store_artifacts: | ||
path: test_results/macro_tests | ||
|
||
integration: | ||
docker: | ||
- image: cimg/python:3.8.5 | ||
parallelism: 15 | ||
steps: | ||
- build_test_env | ||
- run: | ||
name: Run snowflake integration tests | ||
command: | | ||
circleci tests glob test_project/features/*/*.feature | circleci tests split > /tmp/feature-tests-to-run | ||
TARGET=snowflake pipenv run inv integration-tests -t snowflake -u circleci -e secrethub/secrethub_circleci.env | ||
- slack/status: | ||
fail_only: false | ||
mentions: 'URXTX0XEZ' | ||
- store_test_results: | ||
path: test_results/integration_tests | ||
- store_test_results: | ||
path: test_results/macro_tests | ||
- store_artifacts: | ||
path: test_results/integration_tests | ||
- store_artifacts: | ||
path: test_results/macro_tests | ||
|
||
workflows: | ||
version: 2 | ||
test-macros: | ||
jobs: | ||
- macros: | ||
filters: | ||
branches: | ||
only: | ||
- develop | ||
- /^int.*/ | ||
test-integration: | ||
jobs: | ||
- integration: | ||
filters: | ||
branches: | ||
only: | ||
- develop | ||
- /^int.*/ |
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
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,2 @@ | ||
|
||
.idea/ |
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
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