@@ -2,115 +2,69 @@ name: Code Quality
22
33on :
44 pull_request :
5- branches :
6- - main
75
86jobs :
9- setup :
10- name : Setup
11- runs-on : ubuntu-latest
12- steps :
13- - name : Checkout code
14- uses : actions/checkout@v4
15-
16- - name : Setup Node.js
17- uses : actions/setup-node@v4
18- with :
19- node-version : ' lts/*'
20-
21- - name : Install pnpm
22- uses : pnpm/action-setup@v3
23- with :
24- version : ' latest'
25- run_install : false
26-
27- - name : Get pnpm store directory
28- shell : bash
29- run : |
30- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31-
32- - name : Setup pnpm cache
33- uses : actions/cache@v4
34- with :
35- path : ${{ env.STORE_PATH }}
36- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37- restore-keys : |
38- ${{ runner.os }}-pnpm-store-
39-
40- - name : Install dependencies
41- run : pnpm install --frozen-lockfile
42-
437 format :
448 name : Format
45- needs : setup
46- runs-on : ubuntu-latest
9+ runs-on : ubuntu-22.04
10+ strategy :
11+ matrix :
12+ node-version : latest
4713 steps :
48- - name : Checkout code
49- uses : actions/checkout@v4
50-
51- - name : Setup Node.js
52- uses : actions/setup-node@v4
53- with :
54- node-version : ' lts/*'
55-
14+ - uses : actions/checkout@v4
5615 - name : Install pnpm
57- uses : pnpm/action-setup@v3
16+ uses : pnpm/action-setup@v4
5817 with :
59- version : ' latest'
60- run_install : false
61-
18+ version : 10
19+ - name : Use Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+ cache : ' pnpm'
6224 - name : Install dependencies
6325 run : pnpm install --frozen-lockfile
64-
6526 - name : Run Formatter
6627 run : pnpm format:check
67-
6828 test :
69- name : Test
70- needs : setup
71- runs-on : ubuntu-latest
72- steps :
73- - name : Checkout code
74- uses : actions/checkout@v4
75-
76- - name : Setup Node.js
77- uses : actions/setup-node@v4
78- with :
79- node-version : ' lts/*'
80-
81- - name : Install pnpm
82- uses : pnpm/action-setup@v3
83- with :
84- version : ' latest'
85- run_install : false
86-
87- - name : Install dependencies
88- run : pnpm install --frozen-lockfile
89-
90- - name : Run tests
91- run : pnpm test
29+ name : Format
30+ runs-on : ubuntu-22.04
31+ strategy :
32+ matrix :
33+ node-version : latest
34+ steps :
35+ - uses : actions/checkout@v4
36+ - name : Install pnpm
37+ uses : pnpm/action-setup@v4
38+ with :
39+ version : 10
40+ - name : Use Node.js ${{ matrix.node-version }}
41+ uses : actions/setup-node@v4
42+ with :
43+ node-version : ${{ matrix.node-version }}
44+ cache : ' pnpm'
45+ - name : Install dependencies
46+ run : pnpm install --frozen-lockfile
47+ - name : Run tests
48+ run : pnpm test
9249
9350 build :
94- name : Build
95- needs : setup
96- runs-on : ubuntu-latest
51+ name : Format
52+ runs-on : ubuntu-22.04
53+ strategy :
54+ matrix :
55+ node-version : latest
9756 steps :
98- - name : Checkout code
99- uses : actions/checkout@v4
100-
101- - name : Setup Node.js
102- uses : actions/setup-node@v4
103- with :
104- node-version : ' lts/*'
105-
57+ - uses : actions/checkout@v4
10658 - name : Install pnpm
107- uses : pnpm/action-setup@v3
59+ uses : pnpm/action-setup@v4
10860 with :
109- version : ' latest'
110- run_install : false
111-
61+ version : 10
62+ - name : Use Node.js ${{ matrix.node-version }}
63+ uses : actions/setup-node@v4
64+ with :
65+ node-version : ${{ matrix.node-version }}
66+ cache : ' pnpm'
11267 - name : Install dependencies
11368 run : pnpm install --frozen-lockfile
114-
11569 - name : Build project
11670 run : pnpm build
0 commit comments