Skip to content

Commit

Permalink
Update CI to authenticate to earthengine
Browse files Browse the repository at this point in the history
  • Loading branch information
zacdezgeo committed Jan 8, 2025
1 parent 088bc52 commit b89df26
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ jobs:
run: |
sudo apt update
sudo apt install -y qgis python3-qgis python3-pyqt5 python3-pytest
- name: Set Environment Variables
run: |
echo "QGIS_HOME=/usr" >> $GITHUB_ENV
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Start Virtual Display
run: Xvfb :99 -screen 0 1024x768x24 &

- name: Configure Earth Engine Credentials
run: |
mkdir -p ~/.config/earthengine # Create the directory if it doesn't exist
echo '${{ secrets.EE_CREDENTIALS_JSON }}' > ~/.config/earthengine/credentials
- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions test/test_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def setup_ee():
import ee

ee.Initialize()
ee.Authenticate(auth_mode="localhost", quiet=True)


@pytest.fixture(scope="module", autouse=True)
Expand Down

0 comments on commit b89df26

Please sign in to comment.