-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
33 lines (33 loc) · 1.24 KB
/
Copy pathJenkinsfile
File metadata and controls
33 lines (33 loc) · 1.24 KB
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
pipeline {
agent { docker { image 'python:3.9-slim-buster' } }
stages {
stage('deps') {
steps {
sh '''
apt-get update && apt-get install -y --no-install-recommends curl=7.64.0-4+deb10u2
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python
ln -s /opt/poetry/bin/poetry /usr/local/bin
poetry config virtualenvs.create false
poetry install --no-root
'''
}
}
stage('main') {
steps {
parallel (
'testing': {
sh 'poetry run pytest'
},
'linting': {
sh '''
poetry run isort --diff --check-only --settings-path pyproject.toml ./
poetry run black --diff --check --config pyproject.toml ./
poetry run darglint --verbosity 2 app_python tests
poetry run mypy --config-file pyproject.toml ./
'''
}
)
}
}
}
}