Skip to content

Add additional versions in the test matrix #86

Add additional versions in the test matrix

Add additional versions in the test matrix #86

Workflow file for this run

name: Testing
on:
push:
branches: ["*"]
paths-ignore:
- 'docs/**'
- 'setup.*'
- '*.md'
- '*.rst'
tags-ignore: ["*"]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 3
services:
rabbitmq:
image: rabbitmq:3.12
options: >-
--health-cmd "/opt/rabbitmq/sbin/rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 10s
--health-retries 5
ports:
- 5672
- 15672
strategy:
matrix:
python: [3.7, 3.8, 3.9, 3.10, 3.11]
container:
image: python:${{ matrix.python }}-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install OS dependencies
run: apk --update add gcc make musl-dev linux-headers
- name: Install testing dependencies
run: pip3 --no-cache-dir install -e '.[test]'
- name: Create build directory
run: mkdir build
- name: Create build/test-environment
run: |
echo "export RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672/%2f" > build/test-environment
- name: Run flake8 tests
run: flake8
- name: Run tests
run: coverage run
- name: Output coverage
run: coverage report && coverage xml
- name: Upload Coverage
uses: codecov/codecov-action@v1.0.2
if: github.event_name == 'push' && github.repository == 'gmr/aiorabbit'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: build/coverage.xml
flags: unittests
fail_ci_if_error: true