This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
generated from KOLANICH/python_project_boilerplate.py
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
53 lines (45 loc) · 1.5 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
#image: pypy:latest
image: registry.gitlab.com/kolanich-subgroups/docker-images/fixed_python:latest
variables:
DOCKER_DRIVER: overlay2
SAST_ANALYZER_IMAGE_TAG: latest
SAST_DISABLE_DIND: "true"
SAST_CONFIDENCE_LEVEL: 5
CODECLIMATE_VERSION: latest
include:
- template: SAST.gitlab-ci.yml
- template: Code-Quality.gitlab-ci.yml
- template: License-Management.gitlab-ci.yml
build:
tags:
- shared
- linux
stage: build
variables:
GIT_DEPTH: "1"
PYTHONUSERBASE: ${CI_PROJECT_DIR}/python_user_packages
before_script:
- export PATH="$PATH:$PYTHONUSERBASE/bin" # don't move into `variables`
- apt-get update
- apt-get -y install python3-lz4 python3-msgpack python3-brotli python3-cbor python3-ujson
- pip3 install --upgrade https://gitlab.com/KOLANICH/py-lmdb/-/jobs/artifacts/gitlab/raw/wheels/lmdb-0.CI_cpython_latest-py3-none-any.whl?job=build
- python3 ./fix_python_modules_paths.py
- mkdir -p ./tests/databasesFiles
- mount -t ramfs ramfs ./tests/databasesFiles
script:
- python3 setup.py bdist_wheel
- mv ./dist/*.whl ./dist/Cache-0.CI-py3-none-any.whl
- pip3 install --upgrade -e ./[msgpack,lz4,brotli,zopflipy,cbor,zstd,lmdb]
- coverage run --source=Cache -m pytest --junitxml=./rspec.xml ./tests/test.py
- coverage report -m
- coverage xml
coverage: /^TOTAL(?:\s+\d+){4}\s+(\d+%).+/
cache:
paths:
- $PYTHONUSERBASE
artifacts:
paths:
- dist
reports:
junit: ./rspec.xml
cobertura: ./coverage.xml