diff --git a/.github/workflows/nominatim-docker-test.yml b/.github/workflows/nominatim-docker-test.yml index fbae2678e..79f723136 100644 --- a/.github/workflows/nominatim-docker-test.yml +++ b/.github/workflows/nominatim-docker-test.yml @@ -18,6 +18,11 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest + env: + GEOFABRIK_QUERY_URL: "https://geocoding.geofabrik.de/${{ secrets.GEOFABRIK_API }}" + TEST_KEY: ${{ secrets.TEST_SECRET }} + TEST_ENVVAR: "https://geocoding.geofabrik.de/${{ secrets.TEST_SECRET }}" + TEST_STR: "https://geocoding.geofabrik.de/" # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -29,10 +34,11 @@ jobs: - name: Workflow test run: echo Smoke test + - name: Variable + run: echo "$TEST_KEY" + + - name: Test nominatim run: docker-compose -f emission/integrationTests/docker-compose.yml up --exit-code-from web-server - env: - GEOFABRIK_QUERY_URL: "https://geocoding.geofabrik.de/${{ secrets.GEOFABRIK_API }}" - TEST_KEY: ${{ secrets.TEST_SECRET }} - TEST_ENVVAR: "https://geocoding.geofabrik.de/${{ secrets.TEST_SECRET }}" - TEST_STR: "https://geocoding.geofabrik.de/" + + diff --git a/emission/individual_tests/TestNominatim.py b/emission/individual_tests/TestNominatim.py index 03640c630..8bb1f4d5b 100644 --- a/emission/individual_tests/TestNominatim.py +++ b/emission/individual_tests/TestNominatim.py @@ -17,15 +17,16 @@ import emission.analysis.intake.cleaning.clean_and_resample as clean print("Starting to test Nominatim") +print("keys", os.environ.keys()) #temporarily sets NOMINATIM_QUERY_URL to the environment variable for testing. NOMINATIM_QUERY_URL_env = os.environ.get("NOMINATIM_QUERY_URL", "") NOMINATIM_QUERY_URL = NOMINATIM_QUERY_URL_env if NOMINATIM_QUERY_URL_env != "" else eco.NOMINATIM_QUERY_URL GEOFABRIK_QUERY_URL = os.environ.get("GEOFABRIK_QUERY_URL") -TEST_2ENVVAR = os.environ.get("TEST_ENVVAR") -print("get method", TEST_2ENVVAR) -TEST_2KEY = os.environ.get("TEST_KEY") -print("get method key", TEST_2KEY) +TEST_ENVVAR = os.environ.get("TEST_ENVVAR") +TEST_KEY = os.environ.get("TEST_KEY") TEST_STR = os.environ.get("TEST_STR") +print("Test str w envvar", TEST_ENVVAR) +print("Test key", TEST_KEY) print("TESTSTRING", TEST_STR) #Creates a fake place in Rhode Island to use for testing. fake_id = "rhodeislander"