Repository navigation
145 lines (145 loc) · 4.99 KB
/
Copy pathci.yml
File metadata and controls
145 lines (145 loc) · 4.99 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Release checks
on:
push:
pull_request:
workflow_call:
permissions:
contents: read
jobs:
native:
name: Native ${{ matrix.os }} / Python ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ['3.12', '3.13', '3.14']
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- run: python -m pip install ".[dev]"
- run: python -m pytest -q --ignore=tests/e2e --ignore=tests/integration
- run: python -m pytest -q tests/integration
- run: promptlibrary --version
- run: promptlibrary-mcp --print-config
quality:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: python -m pip install --upgrade pip
- run: python -m pip install ".[dev,desktop]"
- run: python -m ruff check .
- run: python -m ruff format --check .
- run: python -m mypy src/promptlibrary
- run: python scripts/check_release_assets.py
- run: python scripts/audit_dependencies.py
browser:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: python -m pip install ".[e2e]"
- run: python -m playwright install --with-deps chromium
- run: python -m pytest -q tests/e2e --browser chromium --tracing retain-on-failure --screenshot only-on-failure
- uses: actions/upload-artifact@v7
if: failure()
with:
name: browser-failure-${{ matrix.os }}
path: test-results/
retention-days: 7
browser-engines:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: python -m pip install ".[e2e]"
- run: python -m playwright install --with-deps firefox webkit
- run: python -m pytest -q tests/e2e --browser firefox --browser webkit
package:
needs: native
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: python -m pip install build
- run: python -m build
- run: python scripts/package_smoke.py
- uses: actions/upload-artifact@v7
with:
name: distributions
path: dist/*
if-no-files-found: error
retention-days: 14
binaries:
name: Binary ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- target: windows-x64
runner: windows-latest
extras: binary,desktop,audit
# Not built yet: windows-arm64 (runner windows-11-arm) and macos-x64 (runner
# macos-15-intel). cryptography publishes no patched wheel for either, so a build
# would fail to compile or bundle a version with known advisories. Re-enable them
# when cryptography 50 or newer ships wheels. See docs/releasing.md.
# Linux binaries are built on the oldest supported Ubuntu so that they run on any
# distribution with glibc 2.35 or newer.
- target: linux-x64
runner: ubuntu-22.04
extras: binary,audit
- target: linux-arm64
runner: ubuntu-22.04-arm
extras: binary,audit
- target: macos-arm64
runner: macos-15
extras: binary,audit
runs-on: ${{ matrix.runner }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
- run: python -m pip install --upgrade pip
# Prefer prebuilt wheels so a missing wheel is reported instead of compiling from source.
- run: python -m pip install --prefer-binary ".[${{ matrix.extras }}]"
# Audit what this exact binary will bundle. The quality job only audits Linux, where
# newer wheels exist than on some other targets.
- run: python scripts/audit_dependencies.py
- run: python scripts/build_binary.py
- name: Smoke-test the executable
run: python scripts/binary_smoke.py dist-binary/promptlibrary-*-${{ matrix.target }}*
- uses: actions/upload-artifact@v7
with:
name: binary-${{ matrix.target }}
path: dist-binary/promptlibrary-*
if-no-files-found: error
retention-days: 14
docker:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- run: docker build --tag promptlibrary:test .
- run: python scripts/docker_smoke.py