Skip to content

Commit 84dc9df

Browse files
committed
chore: add GitHub workflows
1 parent 938c548 commit 84dc9df

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/format-code.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Code Formatting Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
format-code:
13+
name: Check Code Formatting with Black
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.12"
24+
25+
- name: Install Black
26+
run: pip install black
27+
28+
- name: Run Black Formatting Check
29+
run: black --check .
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Validate Schema
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
validate-schema:
13+
name: Check Schema Consistency
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.12"
24+
25+
- name: Generate schema and check for changes
26+
run: |
27+
python -m scripts.generate_schema > schema.tmp.json
28+
if ! cmp -s schema.tmp.json schema.json; then
29+
echo "❌ schema.json is outdated. Run scripts/generate_schema.py and commit the updated file."
30+
exit 1
31+
fi

0 commit comments

Comments
 (0)