-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·63 lines (56 loc) · 1.31 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
image: python:3.9-slim-buster
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_INDEX_URL: "https://devpi.sbgenomics.com/sbg/dev"
REQUIREMENTS: "requirements-dev.txt"
BUILD_REQUIREMENTS: "gcc"
stages:
- test
- build
- deploy
# We do this for all tests, so extract common part so that
# we can only change python version in each test
.test: &test
stage: test
before_script:
- infinity config build-info
- apt-get update && apt-get install -y $BUILD_REQUIREMENTS
- python --version
- pip install -U -r $REQUIREMENTS
- export PYTHONPATH=$(pwd):$PYTHONPATH
script:
- flake8 .
- py.test -v
artifacts:
paths:
- test-report/htmlcov/*
- coverage_report/*
# Test with python 3.8
test:3.8:
<<: *test
image: python:3.8-slim-buster
# Test with python 3.9
test:3.9:
<<: *test
image: python:3.9-slim-buster
# Build whl
build:
stage: build
before_script:
- infinity config build-info
script:
- echo "Building version $(infinity version get)"
- VERSION=$(infinity version get) python setup.py bdist_wheel
artifacts:
paths:
- dist/*.whl
# Deploy package
deploy:
stage: deploy
before_script:
- infinity config build-info
dependencies:
- build
script:
- infinity devpi upload --from-dir ./dist/