-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.75 KB
/
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
name: CI
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
- run: pip install .[test]
# Python 3.10 issues "DeprecationWarning: There is no current event loop" spuriously
- if: matrix.python-version == '3.10'
name: Test
env:
TEST_RABBIT_URL: amqp://127.0.0.1:${{ job.services.rabbitmq.ports[5672] }}
shell: bash
run: |
coverage run --append --source=yapw -m pytest
pip install orjson
coverage run --append --source=yapw -m pytest
pip uninstall -y orjson
- if: matrix.python-version == '3.10'
name: Test
env:
TEST_RABBIT_URL: amqp://127.0.0.1:${{ job.services.rabbitmq.ports[5672] }}
shell: bash
run: |
coverage run --append --source=yapw -m pytest -W error -W ignore::ResourceWarning
pip install orjson
coverage run --append --source=yapw -m pytest -W error -W ignore::ResourceWarning
pip uninstall -y orjson
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
services:
rabbitmq:
image: rabbitmq:latest
options: >-
--health-cmd "rabbitmq-diagnostics -q check_running"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5672/tcp