forked from agentscope-ai/QwenPaw
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.59 KB
/
Copy pathnpm-format.yml
File metadata and controls
68 lines (57 loc) · 1.59 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
57
58
59
60
61
62
63
64
65
66
67
68
name: NPM Format (website & console)
on: [push, pull_request]
jobs:
spam-gate:
name: PR Spam Gate
if: github.event_name == 'pull_request'
uses: ./.github/workflows/pr-spam-gate.yml
with:
author: ${{ github.event.pull_request.user.login }}
website:
name: website format check
needs: [spam-gate]
if: |
always() &&
(needs.spam-gate.result == 'skipped' || needs.spam-gate.outputs.blocked != 'true')
runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: website/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run format check
run: pnpm run format:check
console:
name: console format check
needs: [spam-gate]
if: |
always() &&
(needs.spam-gate.result == 'skipped' || needs.spam-gate.outputs.blocked != 'true')
runs-on: ubuntu-latest
defaults:
run:
working-directory: console
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: console/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run format check
run: npm run format:check