-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (95 loc) · 2.7 KB
/
ci.yml
File metadata and controls
114 lines (95 loc) · 2.7 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
typescript: ${{ steps.filter.outputs.typescript }}
python: ${{ steps.filter.outputs.python }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
typescript:
- 'packages/canvas/**'
- 'packages/shared/**'
- 'packages/sdk-core/**'
- 'docs/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'tsconfig.base.json'
- 'turbo.json'
- 'biome.json'
python:
- 'packages/execution/**'
lint-and-typecheck:
name: TS Lint & Typecheck
needs: changes
if: needs.changes.outputs.typescript == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm verify:ts
python:
name: Python Lint & Test
needs: changes
if: needs.changes.outputs.python == 'true' || github.event_name == 'push'
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/execution
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: packages/execution/uv.lock
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: uv sync --frozen
- name: Ruff check
run: uv run ruff check app/ tests/
- name: Ruff format check
run: uv run ruff format --check app/ tests/
- name: Unit tests
run: uv run pytest tests/unit/ -v
commitlint:
name: Commit Messages
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 10.28.0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Validate commit messages
run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}