Skip to content

Commit 7eaee8d

Browse files
authored
Add ci workflow & update react template (#31)
* feat: add ci/cd workflow * fix: update react template * fix: fix react template * fix: fix workflow warning * fix workflow
1 parent 823c5f0 commit 7eaee8d

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

.github/workflows/code-check.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check code health
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [20.x]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: Install dependencies
20+
run: yarn install --immutable --immutable-cache --check-cache
21+
- name: Run lint
22+
run: yarn run lint:eslint
23+
- name: Run build
24+
run: yarn run build
25+
- name: Run test
26+
run: yarn run test

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@
6363
"README.md",
6464
"LICENSE.txt"
6565
]
66-
}
66+
}

templates/react-ts/src/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ createRoot(document.getElementById("root")!).render(
66
<StrictMode>
77
<App />
88
</StrictMode>
9-
);
9+
);

templates/react/src/main.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ createRoot(document.getElementById("root")).render(
66
<StrictMode>
77
<App />
88
</StrictMode>
9-
);
9+
);

0 commit comments

Comments
 (0)