-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (38 loc) · 1.02 KB
/
code-check.yml
File metadata and controls
48 lines (38 loc) · 1.02 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
name: Code Check
on:
pull_request:
branches: [main]
concurrency:
group: test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- uses: actions/cache@v5
id: node-modules-cache
with:
path: |
node_modules
packages/*/node_modules
key: nm-${{ hashFiles('package-lock.json') }}
- run: npm ci
if: steps.node-modules-cache.outputs.cache-hit != 'true'
- run: npm run check:ci
- name: Validate PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | ./node_modules/.bin/commitlint
- uses: astral-sh/ruff-action@v3
with:
args: check
- uses: astral-sh/ruff-action@v3
with:
args: format --check