-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (60 loc) · 1.72 KB
/
ci.yml
File metadata and controls
77 lines (60 loc) · 1.72 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
name: CI
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
data-quality:
name: Data Quality
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: "0.7.3"
- name: Data integrity check
run: uv run --python 3.12 python scripts/check_integrity.py data/sample.jsonl
- name: Duplicate ID dry-run check
run: |
output="$(uv run --python 3.12 python scripts/fix_duplicate_ids.py data/sample.jsonl)"
echo "$output"
duplicate_count="$(echo "$output" | awk -F': ' '/^Duplicate IDs:/ {print $2; exit}')"
if [ -z "$duplicate_count" ]; then
echo "Could not parse duplicate count from fix_duplicate_ids output"
exit 1
fi
if [ "$duplicate_count" -gt 0 ]; then
echo "Duplicate IDs found: $duplicate_count"
exit 1
fi
lint-and-docs:
name: Lint And Docs
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.23.0
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
version: "0.7.3"
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
- name: Lint check
run: pnpm run format:check
- name: SimpleDoc check
run: pnpm dlx @simpledoc/simpledoc check