Skip to content

Migrate to pyproject.toml #1670

Migrate to pyproject.toml

Migrate to pyproject.toml #1670

Workflow file for this run

name: Markdown tests
env:
# enable colored output
# https://github.com/pytest-dev/pytest/issues/7443
PY_COLORS: 1
UV_SYSTEM_PYTHON: 1
on:
workflow_dispatch:
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: ubuntu-latest
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 uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-dependency-glob: "pyproject.toml"
- name: Install packages
run: uv sync --group markdown-docs
- name: Start server
run: |
PREFECT_HOME=$(pwd) uv run prefect server start&
PREFECT_API_URL="http://127.0.0.1:4200/api" uv run ./scripts/wait-for-server.py
- name: Run tests
run: >
PREFECT_API_URL="http://127.0.0.1:4200/api" uv run pytest docs/ --markdown-docs -m markdown-docs
--numprocesses auto
--maxprocesses 6