40
40
YARN_ENABLE_SCRIPTS : false
41
41
run : yarn --immutable
42
42
43
+ prettier :
44
+ needs : prepare-yarn-cache
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - uses : actions/checkout@v2
48
+ - name : Get yarn cache
49
+ id : yarn-cache
50
+ run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
51
+ - uses : actions/cache@v2
52
+ with :
53
+ path : ${{ steps.yarn-cache.outputs.dir }}
54
+ key : yarn2-${{ hashFiles('yarn.lock') }}
55
+ restore-keys : |
56
+ yarn2-
57
+
58
+ with :
59
+ node-version : 14.x
60
+ - name : install
61
+ run : yarn
62
+ - name : run prettier
63
+ run : yarn prettier:check
64
+
65
+ typecheck :
66
+ needs : prepare-yarn-cache
67
+ runs-on : ubuntu-latest
68
+ steps :
69
+ - uses : actions/checkout@v2
70
+ - name : Get yarn cache
71
+ id : yarn-cache
72
+ run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
73
+ - uses : actions/cache@v2
74
+ with :
75
+ path : ${{ steps.yarn-cache.outputs.dir }}
76
+ key : yarn2-${{ hashFiles('yarn.lock') }}
77
+ restore-keys : |
78
+ yarn2-
79
+
80
+ with :
81
+ node-version : 14.x
82
+ - name : install
83
+ run : yarn
84
+ - name : run typecheck
85
+ run : yarn typecheck
86
+
43
87
test-node :
44
88
name :
45
89
# prettier-ignore
54
98
55
99
steps :
56
100
- uses : actions/checkout@v2
57
- with :
58
- fetch-depth : 0
59
101
- name : Get yarn cache
60
102
id : yarn-cache
61
103
run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
@@ -73,10 +115,6 @@ jobs:
73
115
run : |
74
116
yarn
75
117
yarn add --dev eslint@${{matrix.eslint-version }}
76
- - name : run prettier
77
- run : yarn prettier:check
78
- - name : run typecheck
79
- run : yarn typecheck
80
118
- name : run tests
81
119
# only collect coverage on eslint versions that support the suggestions api
82
120
run : yarn test --coverage ${{ matrix.eslint-version >= 6 }}
@@ -109,10 +147,6 @@ jobs:
109
147
node-version : 14.x
110
148
- name : install
111
149
run : yarn
112
- - name : run prettier
113
- run : yarn prettier:check
114
- - name : run typecheck
115
- run : yarn typecheck
116
150
- name : run tests
117
151
run : yarn test --coverage
118
152
env :
@@ -124,8 +158,6 @@ jobs:
124
158
runs-on : ubuntu-latest
125
159
steps :
126
160
- uses : actions/checkout@v2
127
- with :
128
- fetch-depth : 0
129
161
- name : Get yarn cache
130
162
id : yarn-cache
131
163
run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
@@ -153,7 +185,7 @@ jobs:
153
185
# prettier-ignore
154
186
${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
155
187
name : Release new version
156
- needs : [test-node, test-os]
188
+ needs : [prettier, typecheck, test-node, test-os]
157
189
runs-on : ubuntu-latest
158
190
steps :
159
191
- uses : actions/checkout@v2
0 commit comments