diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c716fcf..8595340 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,6 +45,8 @@ jobs: uses: google-github-actions/setup-gcloud@v2 - name: EE token run: echo "ACTION_EE_TOKEN=$(gcloud auth print-access-token)" >> $GITHUB_ENV + - name: Set Project ID + run: echo "PROJECT_ID=openet" >> $GITHUB_ENV - name: Test with pytest run: | python -m pytest diff --git a/openet/core/tests/conftest.py b/openet/core/tests/conftest.py index 12754ed..0c4ab1c 100644 --- a/openet/core/tests/conftest.py +++ b/openet/core/tests/conftest.py @@ -16,7 +16,8 @@ def test_init(): # For GitHub Actions authenticate using workload identify federation if "ACTION_EE_TOKEN" in os.environ: creds = google.oauth2.credentials.Credentials(os.getenv('ACTION_EE_TOKEN')) - ee.Initialize(creds, project=creds.project_id) + # ee.Initialize(creds, project=os.getenv('PROJECT_ID')) + # ee.Initialize(creds, project=os.getenv('PROJECT_ID')) elif 'EE_PRIVATE_KEY_B64' in os.environ: print('Writing privatekey.json from environmental variable ...') content = base64.b64decode(os.environ['EE_PRIVATE_KEY_B64']).decode('ascii')