File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ jobs :
10+ lint :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Install uv
16+ uses : astral-sh/setup-uv@v5
17+ with :
18+ enable-cache : true
19+
20+ - name : Lint
21+ run : uv run ruff check
22+
23+ test :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v4
27+
28+ - name : Install uv
29+ uses : astral-sh/setup-uv@v5
30+ with :
31+ enable-cache : true
32+
33+ - name : Test (with coverage gate)
34+ run : uv run pytest
35+
36+ build :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v4
40+
41+ - name : Install uv
42+ uses : astral-sh/setup-uv@v5
43+ with :
44+ enable-cache : true
45+
46+ - name : Build sdist and wheel
47+ run : uv build
48+
49+ - name : Validate distribution metadata
50+ run : uvx twine check dist/*
51+
52+ - name : Smoke-test that the wheel installs and imports
53+ run : |
54+ uv venv /tmp/install-check
55+ uv pip install --python /tmp/install-check dist/*.whl
56+ /tmp/install-check/bin/python -c "import linear_python_client; print('installed', linear_python_client.__version__)"
57+
58+ # Live smoke test runs on every push to main (not PRs, to avoid API calls on every review).
59+ smoke :
60+ needs : [lint, test, build]
61+ if : github.event_name == 'push'
62+ uses : ./.github/workflows/smoke.yml
63+ secrets :
64+ LINEAR_API_KEY : ${{ secrets.LINEAR_API_KEY }}
Original file line number Diff line number Diff line change 11name : Publish
22
3+ # Runs ONLY when a GitHub Release is published.
4+ # publish is unconditional here — if this workflow fires, it's always a release.
35on :
4- # Build + verify on every push/PR; publish to PyPI when a GitHub Release is published.
5- push :
6- branches : [main]
7- pull_request :
86 release :
97 types : [published]
10- workflow_dispatch :
118
129jobs :
1310 test :
@@ -57,13 +54,11 @@ jobs:
5754 smoke :
5855 needs : [test, build]
5956 uses : ./.github/workflows/smoke.yml
60- if : github.event_name == 'release'
6157 secrets :
6258 LINEAR_API_KEY : ${{ secrets.LINEAR_API_KEY }}
6359
6460 publish :
6561 needs : [test, build, smoke]
66- if : github.event_name == 'release'
6762 runs-on : ubuntu-latest
6863 environment :
6964 name : pypi
You can’t perform that action at this time.
0 commit comments