From 77e656a9dc1b2e003e7cba24d1bfcc1bc8984082 Mon Sep 17 00:00:00 2001
From: Vincent Delbar <vincent.delbar@latelescop.fr>
Date: Mon, 18 Apr 2022 15:49:10 +0200
Subject: [PATCH] CI share cached test data across jobs
---
.gitlab-ci.yml | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a2d4dbb..74e9629 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,11 +3,13 @@ default:
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- - .cache/pip
+ - .cache/pip/
- venv/
+ - test_data/
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+ TEST_DATA_DIR: "$CI_PROJECT_DIR/test_data"
workflow:
rules:
@@ -15,7 +17,7 @@ workflow:
- if: $CI_COMMIT_BRANCH == 'develop' # Execute jobs when a new commit is pushed to default branch
stages:
- - Virtual env
+ - Environment
- Static Analysis
- Install
- Documentation
@@ -23,14 +25,16 @@ stages:
# --------------------------------------------- Init venv --------------------------------------------------------------
-venv:
- stage: Virtual env
+make_env:
+ stage: Environment
before_script:
- sudo apt update && sudo apt install -y virtualenv
script:
- virtualenv --system-site-packages venv
- source venv/bin/activate
- pip install flake8 pylint codespell pytest pytest-cov pdoc3
+ - wget -P . --no-verbose -e robots=off --recursive --level=inf --no-parent -R "index.html*" -R "LOGO.JPG" --cut-dirs=3 --no-host-directories --content-on-error http://indexof.montpellier.irstea.priv/projets/geocicd/scenes/test_data/
+
# --------------------------------------------- Static analysis --------------------------------------------------------
@@ -53,7 +57,7 @@ pylint:
codespell:
extends: .static_analysis_base
script:
- - codespell --skip="*.png,*.template,*.pbs,*.jpg,*git/lfs*,*venv/*"
+ - codespell --skip="*.png,*.template,*.pbs,*.jpg,*git/lfs*,*venv/*,*test_data/*"
# ----------------------------------------------------- Install --------------------------------------------------------
@@ -69,6 +73,7 @@ pip_install:
pages:
stage: Documentation
+ #allow_failure: true
before_script:
- source venv/bin/activate
script:
@@ -83,9 +88,7 @@ pages:
stage: Test
before_script:
- source venv/bin/activate
- - wget -P . --no-verbose -e robots=off --recursive --level=inf --no-parent -R "index.html*" -R "LOGO.JPG" --cut-dirs=3 --no-host-directories --content-on-error http://indexof.montpellier.irstea.priv/projets/geocicd/scenes/test_data/
- mkdir tests_artifacts
- - export TEST_DATA_DIR="$PWD/test_data"
spatial:
extends: .test_base
--
GitLab