-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (44 loc) · 1.05 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
---
variables:
# Change pip's cache directory to be inside the project directory since we
# can only cache local items.
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
image: "python:3.9-slim"
cache:
key:
files:
- pyproject.toml
- poetry.lock
paths:
- .cache/pip
- .venv/
before_script:
- apt-get update
- apt-get install make
- pip install poetry
- poetry config virtualenvs.in-project true
build:
stage: build
script:
- poetry install
lint:
stage: test
script:
# if no global cache servers are registered we might need to reinstall the
# project
- "[ ! -d .venv ] && poetry install"
- poetry run make lint
format:
stage: test
script:
# if no global cache servers are registered we might need to reinstall the
# project
- "[ ! -d .venv ] && poetry install"
- poetry run make format-check
mypy:
stage: test
script:
# if no global cache servers are registered we might need to reinstall the
# project
- "[ ! -d .venv ] && poetry install"
- poetry run make mypy