-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
45 lines (38 loc) · 867 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
45 lines (38 loc) · 867 Bytes
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
image: python:3.11
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
stages:
- test
- build
before_script:
- python --version # For debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -e .[dev,eval]
lint:
stage: test
script:
- python -m pip install flake8
- flake8
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
test:
stage: test
script:
- export IS_TESTING=true
- python -m unittest discover -s uts -p "*.py"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
docs:
stage: build
script:
- sphinx-build -b html docs/source docs/build
artifacts:
paths:
- docs/build
expire_in: 1 week