Skip to content

Commit a6f8364

Browse files
committed
chore: add format and lint pr check
1 parent 4e487eb commit a6f8364

File tree

5 files changed

+38
-0
lines changed

5 files changed

+38
-0
lines changed

.github/workflows/pr_checks.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,32 @@ on:
1818
- main
1919

2020
jobs:
21+
code_style:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
style-command:
26+
- lint
27+
- prettier
28+
project:
29+
- dapps/react-dapp-v2
30+
- wallets/react-wallet-v2
31+
steps:
32+
- name: checkout
33+
uses: actions/checkout@v3
34+
- name: setup-node
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: 18.x
38+
cache: "npm"
39+
cache-dependency-path: "package-lock.json"
40+
- name: install
41+
working-directory: ./${{ matrix.project }}
42+
run: npm ci
43+
- name: check
44+
working-directory: ./${{ matrix.project }}
45+
run: npm run ${{ matrix.style-command }}
46+
2147
preview:
2248
runs-on: ubuntu-latest
2349
outputs:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.changeset
2+
coverage
3+
.idea
4+
.next
5+
node_modules

advanced/dapps/react-dapp-v2/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "next build",
88
"start": "next start",
99
"lint": "next lint",
10+
"prettier": "prettier --check '**/*.{js,ts,jsx,tsx}'",
1011
"prettier:write": "prettier --write '**/*.{js,ts,jsx,tsx}'"
1112
},
1213
"dependencies": {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.changeset
2+
coverage
3+
.idea
4+
.next
5+
node_modules

advanced/wallets/react-wallet-v2/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"build": "next build",
77
"start": "next start",
88
"lint": "next lint",
9+
"prettier": "prettier --check '**/*.{js,ts,jsx,tsx}'",
910
"prettier:write": "prettier --write '**/*.{js,ts,jsx,tsx}'"
1011
},
1112
"dependencies": {

0 commit comments

Comments
 (0)