-
Notifications
You must be signed in to change notification settings - Fork 22
109 lines (84 loc) · 2.33 KB
/
Copy pathci.yml
File metadata and controls
109 lines (84 loc) · 2.33 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
name: CI
on:
pull_request:
paths:
- "cli/**"
- "js/**"
- ".github/workflows/ci.yml"
- ".github/workflows/release.yml"
push:
branches:
- main
paths:
- "cli/**"
- "js/**"
- ".github/workflows/ci.yml"
- ".github/workflows/release.yml"
jobs:
test-cli:
name: Test CLI package (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
env:
UV_PYTHON: ${{ matrix.python-version }}
defaults:
run:
working-directory: cli
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
cache-dependency-glob: uv.lock
cache-suffix: python-${{ matrix.python-version }}
working-directory: cli
- name: Install Python
run: uv python install "${{ matrix.python-version }}"
- name: Sync dependencies
run: uv sync --locked --dev
- name: Verify Python runtime
run: uv run python -c "import os, sys; expected = tuple(map(int, os.environ['UV_PYTHON'].split('.'))); assert sys.version_info[:2] == expected, sys.version"
- name: Type check
run: uv run ty check
- name: Run tests
run: uv run pytest
- name: Lint
run: uv run ruff check
- name: Check formatting
run: uv run ruff format --check
- name: Smoke test CLI help
run: |
uv run glasskit --help
uv run glasskit eval --help
- name: Build package
run: uv build --no-sources --clear
test-js:
name: Test JS create package
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: js
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: js/package-lock.json
- name: Install dependencies
run: npm ci
- name: Test
run: npm test
- name: Check package contents
run: npm pack --dry-run