From 2b07aad93edc07bbffa020497590935b3b51170c Mon Sep 17 00:00:00 2001 From: BRAUN REMI Date: Mon, 4 Dec 2023 10:28:51 +0100 Subject: [PATCH] Update CI to use new containers --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++-------- requirements.txt | 2 +- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8850eb99..ec367684 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,7 @@ stages: - weekly_tests variables: - EEO_DEPS: $REGISTRY_GITLAB/extracteo/extracteo_deps - EO_CONTAINER: $REGISTRY_GITLAB/eo-containers/python + EO_CONTAINER: $REGISTRY_GITLAB/eo-containers EOREADER_CHANGES: eoreader/**/[^_]*.{py,xml} lint: @@ -24,7 +23,7 @@ lint: # Test with data on local disk pytest: - image: $EEO_DEPS:latest + image: $EO_CONTAINER:geo_latest stage: test variables: CI_EOREADER_USE_S3: "0" @@ -59,7 +58,7 @@ pytest: # Test with data on S3 # TODO: create S3-specific CI ? pytest_s3: - image: $EEO_DEPS:latest + image: $EO_CONTAINER:geo_latest stage: test variables: CI_EOREADER_USE_S3: "1" @@ -93,7 +92,7 @@ pytest_s3: # Test SNAP with SNAP pytest_end_to_end: - image: $EEO_DEPS:latest + image: $EO_CONTAINER:geo_latest stage: test variables: EOREADER_USE_DASK: "1" @@ -119,7 +118,7 @@ pytest_end_to_end: when: always pytest_end_to_end310: - image: $EEO_DEPS:310 + image: $EO_CONTAINER:geo_310 stage: test variables: # Use Dask for python 3.10 @@ -147,7 +146,7 @@ pytest_end_to_end310: needs: [ "pytest_end_to_end" ] pytest_end_to_end311: - image: $EEO_DEPS:311 + image: $EO_CONTAINER:geo_311 stage: test variables: # Use Dask for python 3.11 @@ -174,8 +173,36 @@ pytest_end_to_end311: when: always needs: [ "pytest_end_to_end310" ] +pytest_end_to_end312: + image: $EO_CONTAINER:geo_312 + stage: test + variables: + # Use Dask for python 3.11 + EOREADER_USE_DASK: "1" + before_script: + - python -m pip install --upgrade pip + - pip install --ignore-installed PyYAML + - pip install pytest coverage pytest-cov pylint + - pip install -e . + script: + - python -m pytest -v --durations=0 --cov-report term --cov-report html:${CI_PROJECT_DIR}/cov_e2e.html --cov=eoreader --cov-config=.coveragerc CI/SCRIPTS_SNAP/test_all_sat_end_to_end_on_disk.py --log-cli-level DEBUG --capture=tee-sys + artifacts: + paths: + - ${CI_PROJECT_DIR}/cov_e2e.html + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + tags: + - sertit + - linux + - high_memory + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_NAME == "END_TO_END"' + when: always + - if: $CI_COMMIT_TAG + when: always + needs: [ "pytest_end_to_end311" ] + tox-linux-3.9:on-schedule: - image: $EO_CONTAINER:3.9 + image: $EO_CONTAINER:geo_39 stage: weekly_tests before_script: - python -m pip install --upgrade pip diff --git a/requirements.txt b/requirements.txt index 38678313..afbc8792 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ dicttoxml # Paths validators -cloudpathlib>=0.10.0 +cloudpathlib[s3]>=0.10.0 # Raster libs scipy