Debian Codegraph @

.github/workflows/python-package.yml

raw
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
4 name: Celery
5
6 on:
7 push:
8 branches: [ 'main', 'v5.6.x' ]
9 paths:
10 - '**.py'
11 - '**.txt'
12 - '.github/workflows/python-package.yml'
13 - '**.toml'
14 - "tox.ini"
15 pull_request:
16 branches: [ 'main', 'v5.6.x' ]
17 paths:
18 - '**.py'
19 - '**.txt'
20 - '**.toml'
21 - '.github/workflows/python-package.yml'
22 - "tox.ini"
23 workflow_dispatch:
24
25
26 permissions:
27 contents: read # to fetch code (actions/checkout)
28
29 jobs:
30 Unit:
31
32 runs-on: ${{ matrix.os }}
33 strategy:
34 fail-fast: false
35 matrix:
36 python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.11']
37 os: ["blacksmith-4vcpu-ubuntu-2404", "windows-latest"]
38 exclude:
39 - python-version: '3.9'
40 os: "windows-latest"
41 - python-version: '3.10'
42 os: "windows-latest"
43 - python-version: '3.11'
44 os: "windows-latest"
45 - python-version: '3.12'
46 os: "windows-latest"
47 - python-version: '3.13'
48 os: "windows-latest"
49 - python-version: '3.14t'
50 os: "windows-latest"
51 - python-version: 'pypy3.11'
52 os: "windows-latest"
53
54 steps:
55 - name: Install apt packages
56 if: startsWith(matrix.os, 'blacksmith-4vcpu-ubuntu')
57 run: |
58 sudo apt-get update && sudo apt-get install -f libcurl4-openssl-dev libssl-dev libgnutls28-dev httping expect libmemcached-dev
59 - uses: actions/checkout@v6
60 - name: Set up Python ${{ matrix.python-version }}
61 uses: useblacksmith/setup-python@v6
62 with:
63 python-version: ${{ matrix.python-version }}
64 allow-prereleases: true
65 cache: 'pip'
66 cache-dependency-path: '**/setup.py'
67
68 - name: Install tox
69 run: python -m pip install --upgrade pip 'tox' tox-gh-actions
70 - name: >
71 Run tox for
72 "${{ matrix.python-version }}-unit"
73 timeout-minutes: 30
74 run: |
75 tox --verbose --verbose
76
77 - uses: codecov/codecov-action@v5
78 with:
79 flags: unittests # optional
80 fail_ci_if_error: true # optional (default = false)
81 token: ${{ secrets.CODECOV_TOKEN }}
82 verbose: true # optional (default = false)
83
84 - name: Upload test results to Codecov
85 if: ${{ !cancelled() }}
86 uses: codecov/test-results-action@v1
87 with:
88 token: ${{ secrets.CODECOV_TOKEN }}
89
90 Integration-tests:
91 needs: [Unit]
92 if: needs.Unit.result == 'success'
93 strategy:
94 matrix:
95 module: [
96 'test_backend.py',
97 'test_canvas.py',
98 'test_dedup_chain_dispatch.py',
99 'test_inspect.py',
100 'test_loader.py',
101 'test_mem_leak_in_exception_handling.py',
102 'test_quorum_queue_qos_cluster_simulation.py',
103 'test_rabbitmq_chord_unlock_routing.py',
104 'test_rabbitmq_default_queue_type_fallback.py',
105 'test_security.py',
106 'test_serialization.py',
107 'test_tasks.py',
108 'test_worker.py'
109 ]
110 uses: ./.github/workflows/integration-tests.yml
111 with:
112 module_name: ${{ matrix.module }}
113
114 Smoke-tests:
115 needs: [Unit]
116 if: needs.Unit.result == 'success'
117 strategy:
118 matrix:
119 module: [
120 'test_broker_failover.py',
121 'test_worker_failover.py',
122 'test_native_delayed_delivery.py',
123 'test_quorum_queues.py',
124 'test_hybrid_cluster.py',
125 'test_revoke.py',
126 'test_visitor.py',
127 'test_canvas.py',
128 'test_consumer.py',
129 'test_control.py',
130 'test_signals.py',
131 'test_tasks.py',
132 'test_thread_safe.py',
133 'test_worker.py'
134 ]
135 uses: ./.github/workflows/smoke-tests.yml
136 with:
137 module_name: ${{ matrix.module }}