File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Frontend Lint
2+
3+ on :
4+ pull_request_target :
5+ paths :
6+ - ' fe/**'
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pull-requests : read
12+
13+ jobs :
14+ lint :
15+ name : Run Frontend Lint
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout pull request code
20+ uses : actions/checkout@v4
21+ with :
22+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
23+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
24+ persist-credentials : false
25+
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ' 20'
30+
31+ - name : Setup pnpm
32+ uses : pnpm/action-setup@v3
33+ with :
34+ version : 8
35+ run_install : false
36+
37+ - name : Get pnpm store directory
38+ id : pnpm-cache
39+ shell : bash
40+ run : |
41+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
42+
43+ - name : Setup pnpm cache
44+ uses : actions/cache@v4
45+ with :
46+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
47+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('fe/pnpm-lock.yaml') }}
48+ restore-keys : |
49+ ${{ runner.os }}-pnpm-store-
50+
51+ - name : Install dependencies
52+ working-directory : ./fe
53+ run : pnpm install --frozen-lockfile --ignore-scripts
54+
55+ - name : Run linter
56+ working-directory : ./fe
57+ run : pnpm lint
You can’t perform that action at this time.
0 commit comments