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
|
name: Smoke Tests
on:
workflow_call:
inputs:
module_name:
description: 'Name of the test module to run (e.g., test_broker_failover.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"]'
jobs:
testing-with:
runs-on: blacksmith-4vcpu-ubuntu-2404
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(inputs.python_versions) }}
steps:
- name: Fetch Docker Images
run: |
docker pull redis:latest
docker pull rabbitmq:latest
- name: Install apt packages
run: |
sudo apt update
sudo apt-get install -y procps # Install procps to enable sysctl
sudo sysctl -w vm.overcommit_memory=1
- uses: actions/checkout@v6
- name: Setup Docker Builder
uses: useblacksmith/setup-docker-builder@v1
- 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 }}-smoke-${{ inputs.module_name }}"
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 5
retry_wait_seconds: 60
command: |
tox --verbose --verbose -e "${{ matrix.python-version }}-smoke" -- -k ${{ inputs.module_name }} -n auto
|