Commit a3ee5f87 authored by Vincent Delbar's avatar Vincent Delbar
Browse files

Merge branch 'vincent.delbar-develop-patch-15971' into 'develop'

CI share cached test data across jobs

Closes #15

See merge request !32
1 merge request!32CI share cached test data across jobs
Pipeline #35099 passed with stages
in 5 minutes and 2 seconds
Showing with 10 additions and 7 deletions
+10 -7
...@@ -3,11 +3,13 @@ default: ...@@ -3,11 +3,13 @@ default:
cache: cache:
key: $CI_COMMIT_REF_SLUG key: $CI_COMMIT_REF_SLUG
paths: paths:
- .cache/pip - .cache/pip/
- venv/ - venv/
- test_data/
variables: variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
TEST_DATA_DIR: "$CI_PROJECT_DIR/test_data"
workflow: workflow:
rules: rules:
...@@ -15,7 +17,7 @@ workflow: ...@@ -15,7 +17,7 @@ workflow:
- if: $CI_COMMIT_BRANCH == 'develop' # Execute jobs when a new commit is pushed to default branch - if: $CI_COMMIT_BRANCH == 'develop' # Execute jobs when a new commit is pushed to default branch
stages: stages:
- Virtual env - Environment
- Static Analysis - Static Analysis
- Install - Install
- Documentation - Documentation
...@@ -23,14 +25,16 @@ stages: ...@@ -23,14 +25,16 @@ stages:
# --------------------------------------------- Init venv -------------------------------------------------------------- # --------------------------------------------- Init venv --------------------------------------------------------------
venv: make_env:
stage: Virtual env stage: Environment
before_script: before_script:
- sudo apt update && sudo apt install -y virtualenv - sudo apt update && sudo apt install -y virtualenv
script: script:
- virtualenv --system-site-packages venv - virtualenv --system-site-packages venv
- source venv/bin/activate - source venv/bin/activate
- pip install flake8 pylint codespell pytest pytest-cov pdoc3 - 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 -------------------------------------------------------- # --------------------------------------------- Static analysis --------------------------------------------------------
...@@ -53,7 +57,7 @@ pylint: ...@@ -53,7 +57,7 @@ pylint:
codespell: codespell:
extends: .static_analysis_base extends: .static_analysis_base
script: script:
- codespell --skip="*.png,*.template,*.pbs,*.jpg,*git/lfs*,*venv/*" - codespell --skip="*.png,*.template,*.pbs,*.jpg,*git/lfs*,*venv/*,*test_data/*"
# ----------------------------------------------------- Install -------------------------------------------------------- # ----------------------------------------------------- Install --------------------------------------------------------
...@@ -69,6 +73,7 @@ pip_install: ...@@ -69,6 +73,7 @@ pip_install:
pages: pages:
stage: Documentation stage: Documentation
#allow_failure: true
before_script: before_script:
- source venv/bin/activate - source venv/bin/activate
script: script:
...@@ -83,9 +88,7 @@ pages: ...@@ -83,9 +88,7 @@ pages:
stage: Test stage: Test
before_script: before_script:
- source venv/bin/activate - 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 - mkdir tests_artifacts
- export TEST_DATA_DIR="$PWD/test_data"
spatial: spatial:
extends: .test_base extends: .test_base
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment