forked from chrysn/aiocoap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
133 lines (128 loc) · 5.36 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# 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.7:
image: "python:3.7"
script:
- echo Using cache:; ls .eggs/ || echo No cached .eggs found
- rm -f .coverage* collected-coverage/3.7/
- 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>=0.1.11a1'"
# For unknown reasons the plugtest server doesn't find plugtest_common.py
# in the GitLab runner, even though it does find it in all other versions
# and locally. Try removing the next line whenever this is next touched.
- export PYTHONPATH=./contrib/oscore-plugtest/:$PYTHONPATH
- python3 -m coverage run --parallel ./setup.py test
- pip3 install uvloop
- AIOCOAP_TESTS_LOOP=uvloop python3 -m coverage run --parallel ./setup.py test
# Could just as well do this on the default main loop, but AFAIR uvloop
# required occasional workarounds
- AIOCOAP_TESTS_LOOP=uvloop AIOCOAP_CLIENT_TRANSPORT=oscore:simple6 AIOCOAP_SERVER_TRANSPORT=oscore:simplesocketserver python3 -m coverage run --parallel ./setup.py test
# Not installing python3-gi directly, as Debian's dist-modules is not in
# docker image's Python path
- apt-get update
- apt-get -y install libgirepository1.0-dev
- pip3 install pygobject gbulb
- AIOCOAP_TESTS_LOOP=gbulb python3 -m coverage run --parallel ./setup.py test || echo Letting failing gbulb test slide
- python3 -m coverage combine
- python3 -m coverage report --include=aiocoap/\*
- mkdir collected-coverage/3.7/ -p
- mv .coverage* collected-coverage/3.7/
- "AIOCOAP_TEST_MCIF=\"$(ip -j -6 route list default | python3 -c 'import sys, json; print(json.load(sys.stdin)[0][\"dev\"])')\" ./setup.py test"
artifacts:
paths:
- collected-coverage
cache:
key: python3.7
paths:
- .eggs/
# Notes about the 3.7 cases apply here as well
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>=0.1.11a1'"
- python3 -m coverage run --parallel ./setup.py test
- pip3 install uvloop
- AIOCOAP_TESTS_LOOP=uvloop python3 -m coverage run --parallel ./setup.py test
# Could just as well do this on the default main loop, but AFAIR uvloop
# required occasional workarounds
- AIOCOAP_TESTS_LOOP=uvloop AIOCOAP_CLIENT_TRANSPORT=oscore:simple6 AIOCOAP_SERVER_TRANSPORT=oscore:simplesocketserver python3 -m coverage run --parallel ./setup.py test
# Not installing python3-gi directly, as Debian's dist-modules is not in
# docker image's Python path
- apt-get update
- apt-get -y install libgirepository1.0-dev
- pip3 install pygobject gbulb
- AIOCOAP_TESTS_LOOP=gbulb python3 -m coverage run --parallel ./setup.py test || echo Letting failing gbulb test slide
- 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.
#
# Running only minimal tests here.
image: "python:3.5-jessie"
script:
- apt-get update
- echo Using cache:; ls .eggs/ || echo No cached .eggs found
- AIOCOAP_TEST_EXTRAS= ./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>=0.1.11a1'"
- 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
include:
- template: SAST.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml