forked from TEAM-MAT/lockerweb
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (45 loc) · 1.4 KB
/
lint-check.yml
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
name: Check code
on:
pull_request:
types: [ opened, edited, reopened, synchronize ]
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Enable corepack
run: corepack enable
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build client
run: pnpm -r --filter=client build
- name: Run prettier check
run: pnpm -r prettier
- name: Run eslint in server and types
run: pnpm -r --filter=!client lint
- name: Run eslint on changed files in client
uses: tj-actions/eslint-changed-files@v25
with:
path: "./packages/client"
file_extensions: "**/*.{ts, svelte}"
- name: Run svelte-check
run: pnpm -r check