Skip to content

Test integration

Test integration #21

name: Test integration
on:
workflow_dispatch:
jobs:
test-pypi:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: [ '3.8', '3.12' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
# - name: Install geedim from PyPI
# run: |
# python -m pip install --upgrade pip pytest geedim
#
# - name: Test geedim download CLI
# timeout-minutes: 10
# env:
# EE_SERVICE_ACC_PRIVATE_KEY: ${{ secrets.EE_SERVICE_ACC_PRIVATE_KEY }}
# run: |
# geedim --version
# geedim --help
# geedim download -i LANDSAT/LC08/C02/T1_TOA/LC08_001004_20140609 --scale 100 -o
# test -f ./LANDSAT-LC08-C02-T1_TOA-LC08_001004_20140609.tif && echo "File exists"
# pwd
# ls -l
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist
python -m pip install earthengine-api click rasterio tqdm tabulate
- name: Run integration tests
timeout-minutes: 10
env:
EE_SERVICE_ACC_PRIVATE_KEY: ${{ secrets.EE_SERVICE_ACC_PRIVATE_KEY }}
run: |
python -m pytest -n auto ./tests/integration.py
test-conda:
needs: test-pypi # run after test-conda to limit concurrent ee requests
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
max-parallel: 2
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: [ '3.8', '3.12' ]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
activate-environment: geedim-test
conda-solver: libmamba
# - name: Install geedim
# run: |
# mamba info
# mamba install -c conda-forge geedim=1.7.3 pytest
# # force an update to the latest versions
# mamba update -c conda-forge geedim --force-reinstall
# mamba list
# - name: Test geedim download CLI
# timeout-minutes: 10
# env:
# EE_SERVICE_ACC_PRIVATE_KEY: ${{ secrets.EE_SERVICE_ACC_PRIVATE_KEY }}
# run: |
# geedim --version
# geedim --help
# geedim download -i LANDSAT/LC08/C02/T1_TOA/LC08_001004_20140609 --scale 100 -o
# test -f ./LANDSAT-LC08-C02-T1_TOA-LC08_001004_20140609.tif && echo "File exists"
# pwd
# ls -l
- name: Install dependencies
run: |
conda info
conda install pytest pytest-xdist
conda install earthengine-api click rasterio tqdm tabulate
- name: Run integration tests
timeout-minutes: 10
env:
EE_SERVICE_ACC_PRIVATE_KEY: ${{ secrets.EE_SERVICE_ACC_PRIVATE_KEY }}
run: |
python -m pytest -n auto ./tests/integration.py