forked from pgjones/hypercorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
68 lines (60 loc) · 1.79 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
py37:
image: python:3.7
script:
- pip install tox
- tox -e py37
py38:
image: python:3.8
script:
- pip install tox
- tox -e docs,format,mypy,py38,pep8,setuppy,manifest
pages:
image: python:3.8
script:
- pip install sphinx git+https://github.com/pandas-dev/pydata-sphinx-theme.git@master
- python setup.py install
- rm -rf docs/source && sphinx-apidoc -e -f -o docs/reference/source/ src/hypercorn/
- cd docs/ && make html && cd ../
- mv docs/_build/html/ public/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
.h2spec-script: &h2spec-script
image: python:3.8
script:
- python3 -m pip install trio .
- cd compliance/h2spec && nohup hypercorn --keyfile key.pem --certfile cert.pem -k $WORKER_CLASS server:App &
- wget https://github.com/summerwind/h2spec/releases/download/v2.2.0/h2spec_linux_amd64.tar.gz
- tar -xvf h2spec_linux_amd64.tar.gz
- sleep 10
- ./h2spec -tk -h 127.0.0.1 -p 8000 -o 10
h2spec:
<<: *h2spec-script
variables:
WORKER_CLASS: "asyncio"
h2spec-trio:
<<: *h2spec-script
variables:
WORKER_CLASS: "trio"
.autobahn-script: &autobahn-script
image: python:2.7.16-alpine3.10
script:
- apk --update add build-base libressl libressl-dev ca-certificates libffi-dev python3 python3-dev
- pip install cryptography==2.3.1 autobahntestsuite
- python3 -m pip install trio .
- cd compliance/autobahn && nohup hypercorn -k $WORKER_CLASS server:App &
- while ! netstat -l -t | grep -q 8000; do sleep 1; done
- cd compliance/autobahn && wstest -m fuzzingclient && python summarise.py
artifacts:
paths:
- compliance/autobahn/reports/servers/
autobahn:
<<: *autobahn-script
variables:
WORKER_CLASS: "asyncio"
autobahn-trio:
<<: *autobahn-script
variables:
WORKER_CLASS: "trio"