docs: Fix build badge #199
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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 |