-
Notifications
You must be signed in to change notification settings - Fork 5
111 lines (91 loc) · 2.88 KB
/
Copy pathcode-style.yml
File metadata and controls
111 lines (91 loc) · 2.88 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
name: Code Style
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel superseded runs on feature branches and PRs. Never on develop/main
# or tags: the release gate needs a completed Test/Build run per commit.
cancel-in-progress: >-
${{ github.ref != 'refs/heads/develop'
&& github.ref != 'refs/heads/main'
&& !startsWith(github.ref, 'refs/tags/') }}
jobs:
# CSpell
cspell:
name: CSpell
# Avoid double runs: in-repo branches are covered by the push event above.
# Fork PRs have no push event, so they are covered here instead.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Install CSpell
run: |
npm install -g cspell @cspell/dict-python
- name: Run CSpell
run: |
cspell \
--no-progress \
--no-summary \
--config .cspell/cspell.json \
packages/**/*.py \
packages/**/*.md \
packages/**/*.json \
packages/**/*.toml \
packages/**/*.yml \
packages/**/*.yaml
# Ruff
ruff:
name: Ruff
# Avoid double runs: in-repo branches are covered by the push event above.
# Fork PRs have no push event, so they are covered here instead.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Create build info
run: |
bash scripts/build-info.sh
- name: Install the project
run: uv sync --locked --all-extras --all-packages --no-install-project --dev
- name: Run Ruff
run: |
uv run ruff check
# Ty
ty:
name: Ty
# Avoid double runs: in-repo branches are covered by the push event above.
# Fork PRs have no push event, so they are covered here instead.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Create build info
run: |
bash scripts/build-info.sh
- name: Install the project
run: uv sync --locked --all-extras --all-packages --no-install-project --dev
- name: Run Ruff
run: |
uv run ty check