|
| 1 | +--- |
1 | 2 | stages: |
2 | 3 | - lint |
3 | 4 | - test |
4 | | - |
5 | 5 | variables: |
6 | 6 | EO_CONTAINERS: $REGISTRY_GITLAB/eo-containers |
7 | 7 | EOSETS_CHANGES: eosets/**/[^_]*.{py,xml} |
8 | | - |
9 | | -lint: |
10 | | - image: python:3.10-buster |
11 | | - stage: lint |
12 | | - script: |
13 | | - - python -m pip install --upgrade pip |
14 | | - - pip install ruff |
15 | | - - ruff format && ruff check |
16 | | - except: |
17 | | - - tags |
18 | | - |
19 | | -pytest: |
20 | | - image: $EO_CONTAINERS:geo_latest |
21 | | - stage: test |
22 | | - variables: |
23 | | - CI_EOSETS_USE_S3: "0" |
24 | | - before_script: |
25 | | - - python -m pip install --upgrade pip |
26 | | - - pip install --ignore-installed PyYAML |
27 | | - - pip install -r requirements.txt |
28 | | - - pip install -e . |
29 | | - script: |
30 | | - - python -m pytest ci -v --durations=0 --cov-report term --cov-report html:${CI_PROJECT_DIR}/cov.html --cov=eosets --log-cli-level DEBUG --capture=tee-sys |
31 | | - artifacts: |
32 | | - paths: |
33 | | - - ${CI_PROJECT_DIR}/cov.html |
34 | | - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' |
35 | | - tags: |
36 | | - - sertit |
37 | | - - linux |
38 | | - - high_memory |
| 8 | +include: |
| 9 | + - project: sertit/groupware |
| 10 | + file: /ci_templates/lint_3_10.yaml |
| 11 | + - project: sertit/groupware |
| 12 | + file: /ci_templates/pytest.yaml |
| 13 | +.rules_pytest: |
39 | 14 | rules: |
40 | 15 | - if: $CI_COMMIT_TAG |
41 | 16 | when: never |
42 | | - - if: '$CI_PIPELINE_SOURCE == "schedule"' |
| 17 | + - if: $CI_PIPELINE_SOURCE == "schedule" |
43 | 18 | when: never |
44 | 19 | - changes: |
45 | 20 | - $EOSETS_CHANGES |
46 | 21 | - ci/**/*.{py,xml} |
47 | 22 | - .gitlab-ci.yml |
48 | | - - pytest.ini |
49 | | - needs: [ "lint" ] |
50 | | - |
51 | | -pytest_s3: |
52 | | - image: $EO_CONTAINERS:geo_latest |
53 | | - stage: test |
54 | | - variables: |
55 | | - CI_EOSETS_USE_S3: "1" |
56 | | - before_script: |
57 | | - - python -m pip install --upgrade pip |
58 | | - - pip install --ignore-installed PyYAML |
59 | | - - pip install -r requirements.txt |
60 | | - - pip install -e . |
61 | | - script: |
62 | | - - python -m pytest ci -v --durations=0 --cov-report term --cov-report html:${CI_PROJECT_DIR}/cov_s3.html --cov=eosets --log-cli-level DEBUG --capture=tee-sys |
63 | | - artifacts: |
64 | | - paths: |
65 | | - - ${CI_PROJECT_DIR}/cov_s3.html |
66 | | - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' |
| 23 | +.pytest_tags: |
67 | 24 | tags: |
68 | 25 | - sertit |
69 | 26 | - linux |
70 | 27 | - high_memory |
71 | | - rules: |
72 | | - - if: $CI_COMMIT_TAG |
73 | | - when: never |
74 | | - - if: '$CI_PIPELINE_SOURCE == "schedule"' |
75 | | - when: never |
76 | | - - changes: |
77 | | - - $EOSETS_CHANGES |
78 | | - - ci/**/*.{py,xml} |
79 | | - - .gitlab-ci.yml |
80 | | - - pytest.ini |
81 | | - needs: [ "lint" ] |
82 | | - |
83 | | - |
84 | | -# Test with Python3.13 |
85 | | -pytest_end_to_end_313: |
86 | | - image: $EO_CONTAINERS:geo_313_latest |
87 | | - stage: test |
| 28 | +pytest: |
| 29 | + image: $EO_CONTAINERS:geo_latest |
| 30 | + extends: |
| 31 | + - .pytest |
| 32 | + - .rules_pytest |
| 33 | + - .pytest_tags |
88 | 34 | variables: |
89 | 35 | CI_EOSETS_USE_S3: "0" |
90 | | - before_script: |
91 | | - - python -m pip install --upgrade pip |
92 | | - - pip install --ignore-installed PyYAML |
93 | | - - pip install -r requirements.txt |
94 | | - - pip install -e . |
95 | | - script: |
96 | | - - python -m pytest ci -v --durations=0 --cov-report term --cov=eosets --log-cli-level DEBUG --capture=tee-sys |
97 | | - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' |
98 | | - tags: |
99 | | - - sertit |
100 | | - - linux |
101 | | - - high_memory |
102 | | - rules: |
103 | | - - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_NAME == "3.13"' |
104 | | - when: always |
105 | | - |
106 | | -# Test with Python 3.14 |
| 36 | + PATH_TO_TEST: ci |
| 37 | + COV: eosets |
| 38 | +pytest_s3: |
| 39 | + image: $EO_CONTAINERS:geo_latest |
| 40 | + extends: |
| 41 | + - .pytest |
| 42 | + - .rules_pytest |
| 43 | + - .pytest_tags |
| 44 | + variables: |
| 45 | + CI_EOSETS_USE_S3: "1" |
| 46 | + PATH_TO_TEST: ci |
| 47 | + COV: eosets |
107 | 48 | pytest_end_to_end_314: |
108 | 49 | image: $EO_CONTAINERS:geo_314_latest |
109 | | - stage: test |
| 50 | + extends: |
| 51 | + - .pytest |
| 52 | + - .pytest_tags |
110 | 53 | variables: |
111 | 54 | CI_EOSETS_USE_S3: "0" |
112 | | - before_script: |
113 | | - - python -m pip install --upgrade pip |
114 | | - - pip install --ignore-installed PyYAML |
115 | | - - pip install -r requirements.txt |
116 | | - - pip install -e . |
117 | | - script: |
118 | | - - python -m pytest ci -v --durations=0 --cov-report term --cov=eosets --log-cli-level DEBUG --capture=tee-sys |
119 | | - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' |
120 | | - tags: |
121 | | - - sertit |
122 | | - - linux |
123 | | - - high_memory |
| 55 | + PATH_TO_TEST: ci |
| 56 | + COV: eosets |
124 | 57 | rules: |
125 | | - - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_NAME == "3.14"' |
| 58 | + - if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_NAME == "3.14" |
126 | 59 | when: always |
0 commit comments