Skip to content

Commit dae0900

Browse files
authored
Update CI workflow for linting and code formatting (#7)
* Update CI workflow for linting and code formatting * Add push trigger for main branch in CI workflow
1 parent a8f1e81 commit dae0900

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
1-
name: Linting
1+
name: CI
22

33
on:
44
push:
55
branches:
6-
- '**'
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
711

812
jobs:
913
ci:
10-
runs-on: ${{ matrix.os }}
11-
12-
strategy:
13-
matrix:
14-
os: [ubuntu-latest]
15-
node: [18]
14+
name: Eslint
15+
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v3
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v3
2128
with:
22-
node-version: ${{ matrix.node-version }}
29+
version: 8
30+
2331
- name: Install dependencies
24-
run: yarn install
25-
- name: Prettier
26-
run: yarn run format
27-
- name: Eslint
28-
run: yarn run lint
29-
- name: Type check
30-
run: yarn run type:check
32+
run: pnpm install
33+
34+
- name: Perform linting
35+
run: pnpm run lint
36+
37+
- name: Perform prettifying
38+
run: pnpm run format
39+
40+
- name: Perform type checking
41+
run: pnpm run type:check

0 commit comments

Comments
 (0)