forked from Team-StackUp/stackup
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (76 loc) · 2.15 KB
/
Copy pathlint.yml
File metadata and controls
92 lines (76 loc) · 2.15 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
name: Lint Check
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
# Frontend (TypeScript)
- name: Install frontend dependencies
working-directory: ./frontend
run: npm ci
- name: Lint frontend
working-directory: ./frontend
run: npm run lint
- name: Type check frontend
working-directory: ./frontend
run: npm run type-check
# Backend (Java + Go)
- name: Lint backend Java
working-directory: ./backend
run: |
if [ -f "pom.xml" ]; then
mvn checkstyle:check
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
./gradlew checkstyleMain checkstyleTest
fi
- name: Lint backend Go
working-directory: ./backend
run: |
if [ -f "go.mod" ]; then
go fmt ./...
go vet ./...
if ! command -v golangci-lint &> /dev/null; then
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
fi
golangci-lint run
fi
# AI (Python)
- name: Install AI dependencies
working-directory: ./ai
run: uv sync --extra dev
- name: Lint AI (flake8)
working-directory: ./ai
run: uv run flake8 .
- name: Check AI formatting (black)
working-directory: ./ai
run: uv run black --check .