-
-
Notifications
You must be signed in to change notification settings - Fork 105
56 lines (44 loc) · 1.28 KB
/
lint.yml
File metadata and controls
56 lines (44 loc) · 1.28 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
name: Lint
on:
pull_request:
env:
NODE_VERSION: "22.18.0"
jobs:
web:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Install frontend dependencies
working-directory: web
run: pnpm install
- name: Lint frontend
working-directory: web
run: |
webfiles=$({ git diff --name-only --diff-filter=d "origin/${{ github.base_ref }}"...HEAD -- 'web/'; } | sort -u | sed 's|^web/||' | grep -E '\.(ts|tsx|js|jsx)$' || true)
if [ -n "$webfiles" ]; then echo "$webfiles" | xargs pnpm eslint; else echo "No frontend files to lint."; fi
backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
- name: Lint backend
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
only-new-issues: true