Documentation Engine Enhancements #330
Workflow file for this run
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
name: pytest-celery | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "**.py" | |
- "**.txt" | |
- ".github/workflows/python-package.yml" | |
- "**.toml" | |
- "tox.ini" | |
pull_request: | |
paths: | |
- "**.py" | |
- "**.txt" | |
- "**.toml" | |
- ".github/workflows/python-package.yml" | |
- "tox.ini" | |
permissions: | |
contents: read | |
jobs: | |
Tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: ["ubuntu-latest"] | |
include: | |
- test-type: "unit" | |
tox-env-suffix: "-unit" | |
timeout-minutes: 5 | |
additional-args: "" | |
- test-type: "integration" | |
tox-env-suffix: "-integration" | |
timeout-minutes: 15 | |
additional-args: "-- -n auto --reruns 2 --rerun-except AssertionError" | |
- test-type: "smoke" | |
tox-env-suffix: "-smoke" | |
timeout-minutes: 15 | |
additional-args: "-- -n auto --reruns 2 --rerun-except AssertionError" | |
steps: | |
- name: Fetch Docker Images | |
run: | | |
docker pull redis:latest | |
docker pull rabbitmq:latest | |
docker pull memcached:latest | |
- name: Install apt packages | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
sudo apt update | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox-gh-actions | |
- name: Install Poetry | |
if: startsWith(matrix.os, 'ubuntu-') | |
uses: snok/install-poetry@v1.3.4 | |
- name: Install tox | |
run: poetry install --only ci | |
- name: Run tox for ${{ matrix.python-version }}-${{ matrix.test-type }} | |
timeout-minutes: ${{ matrix.timeout-minutes }} | |
run: tox --verbose --verbose -e "${{ matrix.python-version }}${{ matrix.tox-env-suffix }}" ${{ matrix.additional-args }} | |
- name: Upload coverage reports to Codecov | |
if: matrix.test-type == 'unit' | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
verbose: true |