-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
66 lines (62 loc) · 1.56 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
stages:
- lint
- test
- weekly_tests
variables:
EO_CONTAINERS: $REGISTRY_GITLAB/eo-containers
SU_CHANGES: sertit/[^_]*.{py,xml}
lint:
image: python:3.9-buster
stage: lint
script:
- python -m pip install --upgrade pip
- pip install ruff
- ruff format && ruff check
except:
- tags
pytest:
image: $EO_CONTAINERS:geo_latest
stage: test
variables:
CI_SERTIT_USE_S3: "0"
before_script:
- python -m pip install --upgrade pip
- pip install --ignore-installed PyYAML
- pip install -e .[full]
script:
- python -m pytest -v --durations=0 --cov-report term --cov-report xml:cov.xml --cov=sertit ci --cov-config=.coveragerc --log-cli-level DEBUG --capture=sys
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
tags:
- sertit
- linux
rules:
- if: $CI_COMMIT_TAG
when: never
- changes:
- $SU_CHANGES
- ci/**/*.{py,xml}
- .gitlab-ci.yml
- pytest.ini
needs: [ "lint" ]
pytest_s3:
image: $EO_CONTAINERS:geo_latest
stage: test
before_script:
- python -m pip install --upgrade pip
- pip install --ignore-installed PyYAML
- pip install -e .[full]
script:
- python -m pytest -v --durations=0 --cov-report term --cov-report xml:cov.xml --cov=sertit ci --cov-config=.coveragerc --log-cli-level DEBUG --capture=sys
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
tags:
- sertit
- linux
rules:
- if: $CI_COMMIT_TAG
when: never
- changes:
- $SU_CHANGES
- ci/**/*.{py,xml}
- .gitlab-ci.yml
- pytest.ini
needs: [ "lint" ]