forked from chrysn/aiocoap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
86 lines (83 loc) · 3.03 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
# installation of cython is a workaround for tinydtls-cython that should be avoided there
#
# running tests twice, so if something breaks when optional dependencies are
# missing, it still shows up. (full coverage would mean running each
# combination, but let's not blow the test matrix out of proportion).
test:3.6:
image: "python:3.6-stretch"
script:
- echo Using cache:; ls .eggs/ || echo No cached .eggs found
- rm -f .coverage* collected-coverage/3.6/
- pip3 install coverage
- AIOCOAP_TEST_EXTRAS= python3 -m coverage run --parallel ./setup.py test
# this should be done locally by setup.py, but while pip installation
# works, inside setup.py in doesn't -- still looking for all the details
# for a bug report.
- pip3 install DTLSSocket
- python3 -m coverage run --parallel ./setup.py test
# Workaround for https://github.com/chrysn/aiocoap/issues/118
- pip3 install 'uvloop < 0.11'
- AIOCOAP_TESTS_LOOP=uvloop python3 -m coverage run --parallel ./setup.py test
- python3 -m coverage combine
- python3 -m coverage report --include=aiocoap/\*
- mkdir collected-coverage/3.6/ -p
- mv .coverage* collected-coverage/3.6/
artifacts:
paths:
- collected-coverage
cache:
key: python3.6
paths:
- .eggs/
test:3.5:
# plain python:3.5 (which is based on jessie) has too old OpenSSL to support
# cryptography's AEAD, and python:3.5-stretch is not available from the
# official docker hub python containers.
image: "python:3.5-jessie"
script:
- echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list
- apt-get update
- apt-get -y -t jessie-backports install libssl-dev
- echo Using cache:; ls .eggs/ || echo No cached .eggs found
- AIOCOAP_TEST_EXTRAS= ./setup.py test
# see above
- pip3 install DTLSSocket
- ./setup.py test
# Workaround for https://github.com/chrysn/aiocoap/issues/118
- pip3 install 'uvloop < 0.11'
- AIOCOAP_TESTS_LOOP=uvloop ./setup.py test
cache:
key: python3.5
paths:
- .eggs/
test:pypy:
image: "ubuntu:16.04"
script:
- apt-get update
- apt-get -y install wget ca-certificates bzip2 libexpat1 python-pip python-virtualenv
- '[ -e bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2 ] || wget -S -m https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2'
- tar xf bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
- virtualenv -p pypy3-v6.0.0-linux64/bin/pypy3 venv
- AIOCOAP_TEST_EXTRAS= venv/bin/pypy3 ./setup.py test
- apt-get -y install libssl-dev autoconf
# see above
- venv/bin/pip3 install DTLSSocket
- venv/bin/pypy3 ./setup.py test
cache:
key: pypy
paths:
- bitbucket.org/
pages:
image: "python:3.6-stretch"
stage: deploy
dependencies:
- test:3.6
script:
- pip3 install coverage
- rm -f .coverage* public
- mv collected-coverage/*/.coverage* .
- python3 -m coverage html --include=aiocoap/\*
- mv htmlcov public
artifacts:
paths:
- public