From 4a9bda56ad82cbb2650da1593a809a3eaf79f429 Mon Sep 17 00:00:00 2001 From: mdp0023 Date: Wed, 17 Apr 2024 15:47:18 -0500 Subject: [PATCH] set secret environment --- .github/workflows/compatability_testing.yml | 2 ++ tests/test_svinsight.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compatability_testing.yml b/.github/workflows/compatability_testing.yml index 1e284e8..76b90d1 100644 --- a/.github/workflows/compatability_testing.yml +++ b/.github/workflows/compatability_testing.yml @@ -26,6 +26,8 @@ jobs: pip install .[minimum] fi - name: Test with pytest + env: + API_KEY: ${{ secrets.API_KEY }} run: | pip install pytest pytest \ No newline at end of file diff --git a/tests/test_svinsight.py b/tests/test_svinsight.py index 4302ff8..30b827a 100644 --- a/tests/test_svinsight.py +++ b/tests/test_svinsight.py @@ -118,12 +118,11 @@ def run_svi_workflow(project, boundary, year, overwrite=True): def project(): return svi(project_name, file_path, api_key, geoids) - +api_key = os.getenv('CENSUS_API_KEY') ############################################################################################## # develop a test project for single county project_name = 'test_project_single_county' file_path = os.path.dirname(os.path.realpath(__file__)) -api_key = os.getenv('CENSUS_API_KEY') geoids = ['48453'] boundaries = ['bg', 'tract'] years = [2015, 2020] @@ -139,7 +138,6 @@ def test_single_county_project(project, boundary, year, overwrite=False): # develop a test project for multiple counties project_name = 'test_project_multiple_counties' file_path = os.path.dirname(os.path.realpath(__file__)) -api_key = os.getenv('CENSUS_API_KEY') geoids = ['48453','21117'] boundaries = ['bg', 'tract'] years = [2015, 2020] @@ -155,7 +153,6 @@ def test_multiple_county_project(project, boundary, year, overwrite=False): # develop a test project for multiple states project_name = 'test_project_multiple_states' file_path = os.path.dirname(os.path.realpath(__file__)) -api_key = os.getenv('CENSUS_API_KEY') geoids = ['25','44'] boundaries = ['bg', 'tract'] years = [2015]