Debian Codegraph @

.github/workflows/integration-tests.yml

raw
1 name: Integration Tests
2
3 on:
4 workflow_call:
5 inputs:
6 module_name:
7 description: 'Name of the test module to run (e.g., test_backend.py)'
8 required: true
9 type: string
10 python_versions:
11 description: 'JSON array of Python versions to test'
12 required: false
13 type: string
14 default: '["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]'
15 tox_environments:
16 description: 'JSON array of tox environments to test'
17 required: false
18 type: string
19 default: '["redis", "rabbitmq", "rabbitmq_redis"]'
20
21 jobs:
22 testing-with:
23 timeout-minutes: 240
24 runs-on: blacksmith-4vcpu-ubuntu-2404
25 strategy:
26 fail-fast: false
27 matrix:
28 python-version: ${{ fromJson(inputs.python_versions) }}
29 toxenv: ${{ fromJson(inputs.tox_environments) }}
30
31 services:
32 redis:
33 image: redis
34 ports:
35 - 6379:6379
36 env:
37 REDIS_HOST: localhost
38 REDIS_PORT: 6379
39 rabbitmq:
40 image: rabbitmq:management
41 ports:
42 - 5672:5672
43 - 15672:15672
44 env:
45 RABBITMQ_DEFAULT_USER: guest
46 RABBITMQ_DEFAULT_PASS: guest
47
48 steps:
49 - name: Install apt packages
50 run: |
51 sudo apt-get update && sudo apt-get install -f libcurl4-openssl-dev libssl-dev libgnutls28-dev httping expect libmemcached-dev
52
53 - uses: actions/checkout@v6
54 - name: Set up Python ${{ matrix.python-version }}
55 uses: useblacksmith/setup-python@v6
56 with:
57 python-version: ${{ matrix.python-version }}
58 allow-prereleases: true
59 cache: 'pip'
60 cache-dependency-path: '**/setup.py'
61 - name: Install tox
62 run: python -m pip install --upgrade pip 'tox' tox-gh-actions
63 - name: >
64 Run tox for
65 "${{ matrix.python-version }}-integration-${{ matrix.toxenv }}-${{ inputs.module_name }}"
66 uses: nick-fields/retry@v4
67 with:
68 timeout_minutes: 15
69 max_attempts: 5
70 retry_wait_seconds: 0
71 command: |
72 tox --verbose --verbose -e "${{ matrix.python-version }}-integration-${{ matrix.toxenv }}" -- -k ${{ inputs.module_name }} -vv