| 1 |
name: Aiohttp |
| 2 |
# If you don't understand the reason for a test failure, ping @Dreamsorcerer or open an issue in aio-libs/aiohttp. |
| 3 |
|
| 4 |
on: |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- 'main' |
| 8 |
pull_request: |
| 9 |
branches: |
| 10 |
- 'main' |
| 11 |
|
| 12 |
permissions: |
| 13 |
contents: read |
| 14 |
|
| 15 |
jobs: |
| 16 |
test: |
| 17 |
permissions: |
| 18 |
contents: read # to fetch code (actions/checkout) |
| 19 |
|
| 20 |
name: Aiohttp regression tests |
| 21 |
runs-on: ubuntu-latest |
| 22 |
steps: |
| 23 |
- name: Checkout aiohttp |
| 24 |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| 25 |
with: |
| 26 |
repository: aio-libs/aiohttp |
| 27 |
- name: Checkout llhttp |
| 28 |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| 29 |
with: |
| 30 |
path: vendor/llhttp |
| 31 |
- name: Restore node_modules cache |
| 32 |
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 |
| 33 |
with: |
| 34 |
path: vendor/llhttp/.npm |
| 35 |
key: ubuntu-latest-node-${{ hashFiles('vendor/llhttp/**/package-lock.json') }} |
| 36 |
restore-keys: ubuntu-latest-node- |
| 37 |
- name: Install llhttp dependencies |
| 38 |
run: npm ci --ignore-scripts |
| 39 |
working-directory: vendor/llhttp |
| 40 |
- name: Build llhttp |
| 41 |
run: make |
| 42 |
working-directory: vendor/llhttp |
| 43 |
- name: Setup Python |
| 44 |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 |
| 45 |
with: |
| 46 |
python-version: 3.x |
| 47 |
cache: 'pip' |
| 48 |
cache-dependency-path: 'requirements/*.txt' |
| 49 |
- name: Provision the dev env |
| 50 |
run: >- |
| 51 |
PATH="${HOME}/.local/bin:${PATH}" |
| 52 |
make .develop |
| 53 |
- name: Run tests |
| 54 |
env: |
| 55 |
COLOR: yes |
| 56 |
run: >- |
| 57 |
PATH="${HOME}/.local/bin:${PATH}" |
| 58 |
pytest tests/test_http_parser.py tests/test_web_functional.py |
| 59 |
- name: Run dev_mode tests |
| 60 |
env: |
| 61 |
COLOR: yes |
| 62 |
run: >- |
| 63 |
PATH="${HOME}/.local/bin:${PATH}" |
| 64 |
python -X dev -m pytest -m dev_mode tests/test_http_parser.py tests/test_web_functional.py |