Resolved race condition during Redis backend teardown (#418) #834
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: parallel-support | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- ".github/workflows/parallel-support.yml" | |
- 'src/pytest_celery/vendors/worker/**' | |
- "**.py" | |
- "**.txt" | |
- "**.toml" | |
- "tox.ini" | |
- 'Dockerfile' | |
- "poetry.lock" | |
pull_request: | |
paths: | |
- ".github/workflows/parallel-support.yml" | |
- 'src/pytest_celery/vendors/worker/**' | |
- "**.py" | |
- "**.txt" | |
- "**.toml" | |
- "tox.ini" | |
- 'Dockerfile' | |
- "poetry.lock" | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
xdist: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
os: ["blacksmith-4vcpu-ubuntu-2204"] | |
steps: | |
- name: Fetch Docker Images | |
run: | | |
docker pull redis:latest | |
docker pull rabbitmq:latest | |
docker pull memcached: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@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: useblacksmith/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1.4.1 | |
- name: Install tox | |
run: | | |
poetry config virtualenvs.create false | |
poetry install --only ci | |
- name: Run tox for all environments in parallel | |
timeout-minutes: 30 | |
run: | | |
tox -e xdist | |
parallel: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
os: ["blacksmith-4vcpu-ubuntu-2204"] | |
steps: | |
- name: Fetch Docker Images | |
run: | | |
docker pull redis:latest | |
docker pull rabbitmq:latest | |
docker pull memcached: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@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: useblacksmith/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1.4.1 | |
- name: Install tox | |
run: | | |
poetry config virtualenvs.create false | |
poetry install --only ci | |
- name: Run tox for all environments in parallel | |
timeout-minutes: 30 | |
run: | | |
tox -e parallel |