-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
37 lines (33 loc) · 1017 Bytes
/
.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
stages:
- lint
- test
variables:
PYTHON_VERSION: "3.12"
POETRY_NO_INTERACTION: 1
POETRY_VIRTUALENVS_CREATE: 'false'
POETRY_CACHE_DIR: '/var/cache/pypoetry'
POETRY_HOME: '/usr/local'
lint:
stage: lint
image: python:${PYTHON_VERSION}
before_script:
# Configure git to use the token for your GitLab instance
- git config --global url."https://oauth2:$GITLAB_TOKEN@gitlab.inesctec.pt/".insteadOf "https://gitlab.inesctec.pt/"
script:
- python -m pip install --upgrade pip
- pip install poetry
- poetry install --with test
- flake8
test:
stage: test
image: python:${PYTHON_VERSION}
before_script:
# Configure git to use the token for your GitLab instance
- git config --global url."https://oauth2:$GITLAB_TOKEN@gitlab.inesctec.pt/".insteadOf "https://gitlab.inesctec.pt/"
script:
- python -m pip install --upgrade pip
- pip install poetry
- poetry install --with test
- cd src/market
- pytest --cov
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'