diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3bcd34..42a3561 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,51 @@ jobs: name: ${{ matrix.python-version }} fail_ci_if_error: false + integration: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Build api image + run: docker compose build api + + - name: Launch api + run: docker compose up -d api + env: + TITILER_OPENEO_STAC_API_URL: https://stac.eoapi.dev + TITILER_OPENEO_SERVICE_STORE_URL: services/eoapi.json + + - name: Sleep for 10 seconds + run: sleep 10s + shell: bash + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + + - name: Install OpenEO test suite + run: | + git clone --recurse-submodules -b feature/switch-to-https-submodules-urls https://github.com/vincentsarago/openeo-test-suite.git + cd openeo-test-suite + python -m pip install -e . + + - name: Run openeo-test-suite + run: | + cd openeo-test-suite + python -m pytest src/openeo_test_suite/tests/collections --openeo-backend-url=http://0.0.0.0:8081 + env: + OPENEO_AUTH_METHOD: basic + OPENEO_AUTH_BASIC_USERNAME: anonymous + OPENEO_AUTH_BASIC_PASSWORD: password + + - name: Stop services + run: docker compose stop + # publish: # needs: [tests] # runs-on: ubuntu-latest diff --git a/docker-compose.yml b/docker-compose.yml index 2c4c704..b6fd9be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,10 +37,13 @@ services: # - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} # TiTiler STAC API Config - TITILER_OPENEO_API_DEBUG=TRUE - # - TITILER_OPENEO_API_STAC_API_URL=${TITILER_OPENEO_API_STAC_API_URL} + - TITILER_OPENEO_STAC_API_URL=${TITILER_OPENEO_STAC_API_URL} + - TITILER_OPENEO_SERVICE_STORE_URL=${TITILER_OPENEO_SERVICE_STORE_URL} env_file: - path: .env required: false + volumes: + - ./services:/tmp/services openeo: platform: linux/amd64