Repository navigation
82 lines (77 loc) · 2.65 KB
/
Copy pathci.yml
File metadata and controls
82 lines (77 loc) · 2.65 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
name: package-ci
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.12.3"
python-version: "3.12"
- name: Verify lock
run: uv lock --check
- name: Build package
run: uv build --out-dir dist
- name: Export runtime constraints
run: >-
uv export --locked --no-emit-project --no-hashes
--format requirements-txt -o dist/constraints-runtime.txt
- name: Export MCP constraints
run: >-
uv export --locked --no-emit-project --no-hashes
--format requirements-txt --extra mcp -o dist/constraints-mcp.txt
- name: Upload built artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist
path: dist/
if-no-files-found: error
test:
name: Test package boundaries (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.12.3"
python-version: ${{ matrix.python-version }}
- name: Install locked test environment
run: uv sync --locked --group test
- name: Run public packaging tests
run: uv run --no-sync pytest -q -p no:cacheprovider
smoke:
name: Smoke built wheel (${{ matrix.os }}, Python ${{ matrix.python-version }})
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
- name: Download built artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: dist
path: dist
- name: Smoke exact wheel
run: >-
python scripts/smoke_installed_artifact.py
--dist dist
--workdir "${{ runner.temp }}/coda-smoke"