-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (87 loc) · 2.29 KB
/
Copy pathci.yml
File metadata and controls
107 lines (87 loc) · 2.29 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
name: CI
on:
pull_request:
push:
branches:
- main
- master
permissions:
contents: read
jobs:
quality:
name: Quality And Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
cache-dependency-path: web/console/package-lock.json
- name: Build frontend (needed for go:embed)
run: cd web/console && npm ci && npm run build
- name: Verify no legacy model references
run: |
if git grep -nE "gpt-3\\.5-turbo|gpt-3\\.5|gpt-4o-mini" -- \
':!README.md' \
':!.github/workflows/*.yml' \
':!scripts/release-check.sh'; then
echo "Legacy model references found. Use gpt-4-turbo as baseline."
exit 1
fi
- name: Verify formatting
run: |
UNFORMATTED=$(gofmt -l .)
if [ -n "$UNFORMATTED" ]; then
echo "Unformatted files detected:"
echo "$UNFORMATTED"
exit 1
fi
- name: Verify go.mod/go.sum are tidy
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...
frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: web/console
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
cache-dependency-path: web/console/package-lock.json
- name: Install dependencies
run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Test
run: npx vitest run --reporter=verbose
markdown:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Lint markdown
uses: DavidAnson/markdownlint-cli2-action@v24
with:
globs: |
**/*.md
#*.md