From 9c30b6ca5fec6f6be062b1ca08d460cac9b88922 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Fri, 23 Aug 2024 09:08:51 -0500 Subject: [PATCH] update readme to reflect changes to profile --- .circleci/config.yml | 24 +++++++++++++++++++++++- integration_tests/README.md | 12 +----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 057d9c83..9b3cf783 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -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: @@ -100,3 +118,7 @@ workflows: context: profile-bigquery requires: - integration-postgres + - integration-bigquery-circleci: + context: profile-bigquery + requires: + - integration-postgres diff --git a/integration_tests/README.md b/integration_tests/README.md index 7f74ec35..db685a57 100644 --- a/integration_tests/README.md +++ b/integration_tests/README.md @@ -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 @@ -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.