Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: CI
2 on:
3 push:
4 branches: [ main ]
5 pull_request:
6 branches: [ main ]
7 workflow_dispatch:
8
9 jobs:
10 tox:
11 name: ${{ matrix.name }}
12 runs-on: ubuntu-latest
13 strategy:
14 fail-fast: false
15 matrix:
16 include:
17 - {name: '3.12', python: '3.12', tox: py312}
18 - {name: '3.11', python: '3.11', tox: py311}
19 - {name: '3.10', python: '3.10', tox: py310}
20 - {name: '3.9', python: '3.9', tox: py39}
21 - {name: '3.8', python: '3.8', tox: py38}
22 - {name: 'format', python: '3.12', tox: format}
23 - {name: 'mypy', python: '3.12', tox: mypy}
24 - {name: 'pep8', python: '3.12', tox: pep8}
25 - {name: 'package', python: '3.12', tox: package}
26
27 steps:
28 - uses: actions/checkout@v4
29
30 - uses: actions/setup-python@v5
31 with:
32 python-version: ${{ matrix.python }}
33
34 - name: update pip
35 run: |
36 pip install -U wheel
37 pip install -U setuptools
38 python -m pip install -U pip
39 - run: pip install tox
40
41 - run: tox -e ${{ matrix.tox }}
42
43
44 h2spec:
45 name: ${{ matrix.name }}
46 runs-on: ubuntu-latest
47 strategy:
48 fail-fast: false
49 matrix:
50 include:
51 - {name: 'asyncio', worker: 'asyncio'}
52 - {name: 'trio', worker: 'trio'}
53
54 steps:
55 - uses: actions/checkout@v4
56
57 - uses: actions/setup-python@v5
58 with:
59 python-version: "3.12"
60
61 - name: update pip
62 run: |
63 pip install -U wheel
64 pip install -U setuptools
65 python -m pip install -U pip
66 - run: pip install trio .
67
68 - name: Run server
69 working-directory: compliance/h2spec
70 run: nohup hypercorn --keyfile key.pem --certfile cert.pem -k ${{ matrix.worker }} server:app &
71
72 - name: Download h2spec
73 run: |
74 wget https://github.com/summerwind/h2spec/releases/download/v2.6.0/h2spec_linux_amd64.tar.gz
75 tar -xvf h2spec_linux_amd64.tar.gz
76
77 - name: Run h2spec
78 run: ./h2spec -tk -h 127.0.0.1 -p 8000 -o 10
79
80 autobahn:
81 name: ${{ matrix.name }}
82 runs-on: ubuntu-latest
83 strategy:
84 fail-fast: false
85 matrix:
86 include:
87 - {name: 'asyncio', worker: 'asyncio'}
88 - {name: 'trio', worker: 'trio'}
89
90 steps:
91 - uses: actions/checkout@v4
92
93 - uses: actions/setup-python@v5
94 with:
95 python-version: "3.10"
96
97 - name: update pip
98 run: |
99 pip install -U wheel
100 pip install -U setuptools
101 python -m pip install -U pip
102 - run: python3 -m pip install trio .
103 - name: Run server
104 working-directory: compliance/autobahn
105 run: nohup hypercorn -k ${{ matrix.worker }} server:app &
106
107 - name: Run Unit Tests
108 working-directory: compliance/autobahn
109 run: docker run --rm --network=host -v "${PWD}/:/config" -v "${PWD}/reports:/reports" --name fuzzingclient crossbario/autobahn-testsuite wstest -m fuzzingclient -s /config/fuzzingclient.json && python3 summarise.py