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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
name: Integration Tests
on:
workflow_call:
inputs:
module_name:
description: 'Name of the test module to run (e.g., test_backend.py)'
required: true
type: string
python_versions:
description: 'JSON array of Python versions to test'
required: false
type: string
default: '["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]'
tox_environments:
description: 'JSON array of tox environments to test'
required: false
type: string
default: '["redis", "rabbitmq", "rabbitmq_redis"]'
jobs:
testing-with:
timeout-minutes: 240
runs-on: blacksmith-4vcpu-ubuntu-2404
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(inputs.python_versions) }}
toxenv: ${{ fromJson(inputs.tox_environments) }}
services:
redis:
image: redis
ports:
- 6379:6379
env:
REDIS_HOST: localhost
REDIS_PORT: 6379
rabbitmq:
image: rabbitmq:management
ports:
- 5672:5672
- 15672:15672
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
steps:
- name: Install apt packages
run: |
sudo apt-get update && sudo apt-get install -f libcurl4-openssl-dev libssl-dev libgnutls28-dev httping expect libmemcached-dev
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: 'pip'
cache-dependency-path: '**/setup.py'
- name: Install tox
run: python -m pip install --upgrade pip 'tox' tox-gh-actions
- name: >
Run tox for
"${{ matrix.python-version }}-integration-${{ matrix.toxenv }}-${{ inputs.module_name }}"
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 5
retry_wait_seconds: 0
command: |
tox --verbose --verbose -e "${{ matrix.python-version }}-integration-${{ matrix.toxenv }}" -- -k ${{ inputs.module_name }} -vv
|