-
-
Notifications
You must be signed in to change notification settings - Fork 18
40 lines (38 loc) · 1.17 KB
/
code-quality.yml
File metadata and controls
40 lines (38 loc) · 1.17 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
name: Code quality
on:
pull_request:
jobs:
quality:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 2.4.0
- name: Get changed backend files
id: changed
run: |
files=$(git diff --name-only --diff-filter=ACMR \
"${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}" \
-- 'backend/' \
| grep -E '\.(ts|tsx|js|jsx|json)$' \
| tr '\n' ' ' || true)
echo "files=$files" >> "$GITHUB_OUTPUT"
echo "Changed backend files: $files"
- name: Run Biome
if: steps.changed.outputs.files != ''
run: biome ci --formatter-enabled=false --assist-enabled=false ${{ steps.changed.outputs.files }}