Skip to content

one small type fix (#15479) #18

one small type fix (#15479)

one small type fix (#15479) #18

name: Markdown tests
env:
# enable colored output
# https://github.com/pytest-dev/pytest/issues/7443
PY_COLORS: 1
on:
pull_request:
paths:
- .github/workflows/markdown-tests.yaml
- "docs/"
- requirements-client.txt
- requirements-dev.txt
- requirements-markdown-tests.txt
- requirements.txt
- setup.cfg
- Dockerfile
push:
branches:
- main
paths:
- .github/workflows/markdown-tests.yaml
- "src/prefect/**/*.py"
- "tests/**/*.py"
- requirements-client.txt
- requirements-dev.txt
- requirements-markdown-tests.txt
- requirements.txt
- setup.cfg
- Dockerfile
permissions:
contents: read
# Limit concurrency by workflow/branch combination.
#
# For pull request builds, pushing additional changes to the
# branch will cancel prior in-progress and pending builds.
#
# For builds triggered on a branch push, additional changes
# will wait for prior builds to complete before starting.
#
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
run-markdown-tests:
runs-on:
group: oss-larger-runners
name: markdown:${{ matrix.python-version }}, ${{ matrix.database }}
strategy:
matrix:
database:
- "sqlite"
python-version:
- "3.9"
fail-fast: true
timeout-minutes: 15
steps:
- name: Display current test matrix
run: echo '${{ toJSON(matrix) }}'
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: setup_python
with:
python-version: ${{ matrix.python-version }}
- name: UV Cache
# Manually cache the uv cache directory
# until setup-python supports it:
# https://github.com/actions/setup-python/issues/822
uses: actions/cache@v4
id: cache-uv
with:
path: ~/.cache/uv
key: uvcache-markdown-tests-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements-client.txt', 'requirements.txt', 'requirements-dev.txt', 'requirements-markdown.txt') }}
- name: Install packages
run: |
python -m pip install -U uv
uv pip install --upgrade --system -e '.[markdown-tests]'
- name: Run tests
run: >
pytest docs/ --markdown-docs -m markdown-docs
--numprocesses auto
--maxprocesses 6