-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
95 lines (86 loc) · 1.52 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
default:
tags:
- gpu # we don't really need gpu, but we want to use our server
variables:
POETRY_VIRTUALENVS_IN_PROJECT: "true"
stages:
- generate
- dependencies
- lint
- test
cache: &dependency_cache
key:
files:
- poetry.lock
paths:
- .venv
policy: pull
generate:
image: openapitools/openapi-generator-cli:latest
stage: generate
script:
- ./gen.sh $SPEC $GENERATOR
parallel:
matrix:
- GENERATOR: [html2, dynamic-html]
SPEC: [ccs_rest, tams_rest]
artifacts:
paths:
- result
expire_in: 1 week
name: $SPEC_api
needs: []
format:
image: pyfound/black
stage: lint
script:
- black --check --diff */
needs: []
isort:
image: python:3.10-slim
stage: lint
before_script:
- pip install -U isort
script:
- isort --check-only .
needs: []
dependencies:
image: duffn/python-poetry:3.10-slim
stage: dependencies
cache:
<<: *dependency_cache
policy: pull-push
artifacts:
expire_in: 1 days
paths:
- .venv
script:
- poetry install
- poetry check
needs: []
mypy:
image: duffn/python-poetry:3.10-slim
stage: lint
cache:
key: $CI_JOB_NAME
paths:
- .mypy_cache
script:
- poetry run mypy src
artifacts:
expire_in: 1 days
paths:
- xunit-reports/*
needs:
- dependencies
pylint:
image: duffn/python-poetry:3.10-slim
stage: lint
cache:
key: $CI_JOB_NAME
paths:
- .pylint_cache
script:
- poetry run pylint src/*
needs:
- dependencies