-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (70 loc) · 1.86 KB
/
Copy pathci.yml
File metadata and controls
92 lines (70 loc) · 1.86 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
name: ci
on:
push:
branches:
- main
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Sync dependencies
run: uv sync --locked --dev
- name: Lint
run: uv run ruff check src tests
- name: Test
run: uv run pytest -q
package:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: test
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Build distributions
run: uv build
- name: Validate distribution metadata
run: uvx twine check --strict dist/*
- name: Smoke test installed CLI
run: uv tool run --from . traccia --help
- name: Smoke test npm wrapper against local checkout
run: TRACCIA_USE_LOCAL_REPO=1 node npm/bin/traccia.js --help
- name: Validate npm package contents
run: npm pack --dry-run
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/*