-
Notifications
You must be signed in to change notification settings - Fork 1.7k
96 lines (81 loc) · 2.39 KB
/
markdown-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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