Skip to content

Commit

Permalink
update readme to reflect changes to profile
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Aug 23, 2024
1 parent f06bfaf commit 9c30b6c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
24 changes: 23 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ jobs:
resource_class: large

integration-bigquery:
environment:
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
docker:
- image: cimg/python:3.9
steps:
- checkout
- run: pip install --pre dbt-bigquery -r dev-requirements.txt
- run:
name: "Run OG Tests - BigQuery"
command: ./run_test.sh bigquery
- store_artifacts:
path: integration_tests/logs
- store_artifacts:
path: integration_tests/target
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: large

integration-bigquery-circleci:
environment:
BIGQUERY_SERVICE_KEY_PATH: "/home/circleci/bigquery-service-key.json"
docker:
Expand All @@ -75,7 +93,7 @@ jobs:
command: echo $BIGQUERY_SERVICE_ACCOUNT_JSON > ${HOME}/bigquery-service-key.json
- run:
name: "Run OG Tests - BigQuery"
command: ./run_test.sh bigquery
command: ./run_test.sh bigquery-circleci
- store_artifacts:
path: integration_tests/logs
- store_artifacts:
Expand All @@ -100,3 +118,7 @@ workflows:
context: profile-bigquery
requires:
- integration-postgres
- integration-bigquery-circleci:
context: profile-bigquery
requires:
- integration-postgres
12 changes: 1 addition & 11 deletions integration_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Docker

### Configure credentials
Edit the env file for your TARGET in `integration_tests/.env/[TARGET].env`.
Edit the env file for your TARGET in `integration_tests/.env/[TARGET].env`. These will be used for your profiles.yml.

Load the environment variables:
```shell
Expand Down Expand Up @@ -91,16 +91,6 @@ Where possible, targets are being run in docker containers (this works for Postg

### Creating a new integration test

#### Set up profiles
Do either one of the following:
1. Use `DBT_PROFILES_DIR`
```shell
cp integration_tests/ci/sample.profiles.yml integration_tests/profiles.yml
export DBT_PROFILES_DIR=$(cd integration_tests && pwd)
```
2. Use `~/.dbt/profiles.yml`
- Copy contents from `integration_tests/ci/sample.profiles.yml` into `~/.dbt/profiles.yml`.

#### Add your integration test
This directory contains an example dbt project which tests the macros in the `dbt-utils` package. An integration test typically involves making 1) a new seed file 2) a new model file 3) a generic test to assert anticipated behaviour.

Expand Down

0 comments on commit 9c30b6c

Please sign in to comment.