11name : Tests
2-
32on :
43 pull_request :
54 branches :
87 branches :
98 - main
109
11- env :
12- YARN_CACHE_FOLDER : ~/.yarn
13-
1410jobs :
1511 unit-tests :
1612 name : Unit tests
@@ -22,24 +18,25 @@ jobs:
2218 fetch-depth : 0
2319
2420 - name : Setup Node.js
25- uses : actions/setup-node@v1
21+ uses : actions/setup-node@v2
2622 with :
27- node-version : 14
23+ node-version : ' 14 '
2824
29- - name : Caching
25+ - name : Cache pnpm modules
3026 uses : actions/cache@v2
3127 with :
32- path : ${{ env.YARN_CACHE_FOLDER }}
33- key : ${{ runner.OS }}-yarn- ${{ hashFiles('**/yarn. lock') }}
28+ path : ~/.pnpm-store
29+ key : ${{ runner.os }}-${{ hashFiles('**/pnpm- lock.yaml ') }}
3430 restore-keys : |
35- ${{ runner.OS }}-yarn-${{ env.cache-name }}
36- ${{ runner.OS }}-yarn-
31+ ${{ runner.os }}-
3732
38- - name : Installing dependencies
39- run : yarn install --frozen-lockfile
33+ - uses : pnpm/action-setup@v2.0.1
34+ with :
35+ version : 6
36+ run_install : true
4037
4138 - name : Unit test
42- run : yarn test
39+ run : pnpm run test
4340
4441 - uses : artiomtr/jest-coverage-report-action@v2.0-rc.1
4542 if : " github.event_name == 'pull_request'"
@@ -57,24 +54,25 @@ jobs:
5754 fetch-depth : 0
5855
5956 - name : Setup Node.js
60- uses : actions/setup-node@v1
57+ uses : actions/setup-node@v2
6158 with :
62- node-version : 14
59+ node-version : ' 14 '
6360
64- - name : Caching
61+ - name : Cache pnpm modules
6562 uses : actions/cache@v2
6663 with :
67- path : ${{ env.YARN_CACHE_FOLDER }}
68- key : ${{ runner.OS }}-yarn- ${{ hashFiles('**/yarn. lock') }}
64+ path : ~/.pnpm-store
65+ key : ${{ runner.os }}-${{ hashFiles('**/pnpm- lock.yaml ') }}
6966 restore-keys : |
70- ${{ runner.OS }}-yarn-${{ env.cache-name }}
71- ${{ runner.OS }}-yarn-
67+ ${{ runner.os }}-
7268
73- - name : Installing dependencies
74- run : yarn install --frozen-lockfile
69+ - uses : pnpm/action-setup@v2.0.1
70+ with :
71+ version : 6
72+ run_install : true
7573
7674 - name : Typecheck
77- run : yarn typecheck
75+ run : pnpm run typecheck
7876
7977 lint :
8078 name : Lint
@@ -86,24 +84,25 @@ jobs:
8684 fetch-depth : 0
8785
8886 - name : Setup Node.js
89- uses : actions/setup-node@v1
87+ uses : actions/setup-node@v2
9088 with :
91- node-version : 14
89+ node-version : ' 14 '
9290
93- - name : Caching
91+ - name : Cache pnpm modules
9492 uses : actions/cache@v2
9593 with :
96- path : ${{ env.YARN_CACHE_FOLDER }}
97- key : ${{ runner.OS }}-yarn- ${{ hashFiles('**/yarn. lock') }}
94+ path : ~/.pnpm-store
95+ key : ${{ runner.os }}-${{ hashFiles('**/pnpm- lock.yaml ') }}
9896 restore-keys : |
99- ${{ runner.OS }}-yarn-${{ env.cache-name }}
100- ${{ runner.OS }}-yarn-
97+ ${{ runner.os }}-
10198
102- - name : Installing dependencies
103- run : yarn install --frozen-lockfile
99+ - uses : pnpm/action-setup@v2.0.1
100+ with :
101+ version : 6
102+ run_install : true
104103
105104 - name : Lint
106- run : yarn lint
105+ run : pnpm run lint
107106
108107 check-format :
109108 name : Check format
@@ -115,21 +114,22 @@ jobs:
115114 fetch-depth : 0
116115
117116 - name : Setup Node.js
118- uses : actions/setup-node@v1
117+ uses : actions/setup-node@v2
119118 with :
120- node-version : 14
119+ node-version : ' 14 '
121120
122- - name : Caching
121+ - name : Cache pnpm modules
123122 uses : actions/cache@v2
124123 with :
125- path : ${{ env.YARN_CACHE_FOLDER }}
126- key : ${{ runner.OS }}-yarn- ${{ hashFiles('**/yarn. lock') }}
124+ path : ~/.pnpm-store
125+ key : ${{ runner.os }}-${{ hashFiles('**/pnpm- lock.yaml ') }}
127126 restore-keys : |
128- ${{ runner.OS }}-yarn-${{ env.cache-name }}
129- ${{ runner.OS }}-yarn-
127+ ${{ runner.os }}-
130128
131- - name : Installing dependencies
132- run : yarn install --frozen-lockfile
129+ - uses : pnpm/action-setup@v2.0.1
130+ with :
131+ version : 6
132+ run_install : true
133133
134134 - name : Check format
135- run : yarn lint:format
135+ run : pnpm run lint:format
0 commit comments