Skip to content

Commit eaa280f

Browse files
authored
Improved readability of created workflow (#23)
* Added 1 empty line after each step and 2 empty lines after each job to improve code readability * Updated test snapshots Co-authored-by: ijlee2 <[email protected]>
1 parent 9524903 commit eaa280f

File tree

2 files changed

+216
-0
lines changed

2 files changed

+216
-0
lines changed

templates/.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
- uses: actions/checkout@v2
1818
with:
1919
fetch-depth: 1
20+
2021
- uses: actions/setup-node@v2-beta
2122
with:
2223
node-version: '${{ env.NODE_VERSION }}'
24+
2325
- name: Get package manager's global cache path
2426
id: global-cache-dir-path
2527
run: echo "::set-output name=dir::$(<%
@@ -28,6 +30,7 @@ jobs:
2830
} else {
2931
%>yarn cache dir<%
3032
} %>)"
33+
3134
- name: Cache package manager's global cache
3235
id: cache-global-package-manager-cache
3336
uses: actions/cache@v1
@@ -51,6 +54,7 @@ jobs:
5154
} else {
5255
%>yarn.lock<%
5356
} %>-
57+
5458
- name: Cache node_modules
5559
id: cache-node-modules
5660
uses: actions/cache@v1
@@ -64,6 +68,7 @@ jobs:
6468
} %>') }}
6569
restore-keys: |
6670
${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
71+
6772
- name: Install Dependencies
6873
run: <%
6974
if (packageManager === 'npm') {
@@ -74,9 +79,11 @@ jobs:
7479
if: |
7580
steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' ||
7681
steps.cache-node-modules.outputs.cache-hit != 'true'
82+
7783
- name: Lint
7884
run: <% if (packageManager === 'npm') { %>npm run-script<% } else { %>yarn<% } %> lint
7985

86+
8087
test:
8188
name: Tests
8289
runs-on: ${{ matrix.os }}
@@ -91,9 +98,11 @@ jobs:
9198
- uses: actions/checkout@v2
9299
with:
93100
fetch-depth: 1
101+
94102
- uses: actions/setup-node@v2-beta
95103
with:
96104
node-version: '${{ env.NODE_VERSION }}'
105+
97106
- name: Get package manager's global cache path
98107
id: global-cache-dir-path
99108
run: echo "::set-output name=dir::$(<%
@@ -102,6 +111,7 @@ jobs:
102111
} else {
103112
%>yarn cache dir<%
104113
} %>)"
114+
105115
- name: Cache package manager's global cache
106116
id: cache-global-package-manager-cache
107117
uses: actions/cache@v1
@@ -125,6 +135,7 @@ jobs:
125135
} else {
126136
%>yarn.lock<%
127137
} %>-
138+
128139
- name: Cache node_modules
129140
id: cache-node-modules
130141
uses: actions/cache@v1
@@ -138,6 +149,7 @@ jobs:
138149
} %>') }}
139150
restore-keys: |
140151
${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
152+
141153
- name: Install Dependencies
142154
run: <%
143155
if (packageManager === 'npm') {
@@ -148,9 +160,11 @@ jobs:
148160
if: |
149161
steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' ||
150162
steps.cache-node-modules.outputs.cache-hit != 'true'
163+
151164
- name: Test
152165
run: <% if (packageManager === 'npm') { %>npm run-script<% } else { %>yarn<% } %> test:ember --launch ${{ matrix.browser }}
153166

167+
154168
floating-dependencies:
155169
name: Floating Dependencies
156170
runs-on: ${{ matrix.os }}
@@ -165,9 +179,11 @@ jobs:
165179
- uses: actions/checkout@v2
166180
with:
167181
fetch-depth: 1
182+
168183
- uses: actions/setup-node@v2-beta
169184
with:
170185
node-version: '${{ env.NODE_VERSION }}'
186+
171187
- name: Get package manager's global cache path
172188
id: global-cache-dir-path
173189
run: echo "::set-output name=dir::$(<%
@@ -176,6 +192,7 @@ jobs:
176192
} else {
177193
%>yarn cache dir<%
178194
} %>)"
195+
179196
- name: Cache package manager's global cache
180197
id: cache-global-package-manager-cache
181198
uses: actions/cache@v1
@@ -199,6 +216,7 @@ jobs:
199216
} else {
200217
%>yarn.lock<%
201218
} %>-
219+
202220
- name: Cache node_modules
203221
id: cache-node-modules
204222
uses: actions/cache@v1
@@ -212,6 +230,7 @@ jobs:
212230
} %>') }}
213231
restore-keys: |
214232
${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
233+
215234
- name: Install Dependencies
216235
run: <%
217236
if (packageManager === 'npm') {
@@ -222,9 +241,11 @@ jobs:
222241
if: |
223242
steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' ||
224243
steps.cache-node-modules.outputs.cache-hit != 'true'
244+
225245
- name: Test
226246
run: <% if (packageManager === 'npm') { %>npm run-script<% } else { %>yarn<% } %> test:ember --launch ${{ matrix.browser }}
227247

248+
228249
try-scenarios:
229250
name: Tests - ${{ matrix.ember-try-scenario }}
230251
runs-on: ubuntu-latest
@@ -248,9 +269,11 @@ jobs:
248269
- uses: actions/checkout@v2
249270
with:
250271
fetch-depth: 1
272+
251273
- uses: actions/setup-node@v2-beta
252274
with:
253275
node-version: '${{ env.NODE_VERSION }}'
276+
254277
- name: Get package manager's global cache path
255278
id: global-cache-dir-path
256279
run: echo "::set-output name=dir::$(<%
@@ -259,6 +282,7 @@ jobs:
259282
} else {
260283
%>yarn cache dir<%
261284
} %>)"
285+
262286
- name: Cache package manager's global cache
263287
id: cache-global-package-manager-cache
264288
uses: actions/cache@v1
@@ -282,6 +306,7 @@ jobs:
282306
} else {
283307
%>yarn.lock<%
284308
} %>-
309+
285310
- name: Cache node_modules
286311
id: cache-node-modules
287312
uses: actions/cache@v1
@@ -295,6 +320,7 @@ jobs:
295320
} %>') }}
296321
restore-keys: |
297322
${{ runner.os }}-${{ matrix.node-version }}-nodemodules-
323+
298324
- name: Install Dependencies
299325
run: <%
300326
if (packageManager === 'npm') {
@@ -305,6 +331,7 @@ jobs:
305331
if: |
306332
steps.cache-global-package-manager-cache.outputs.cache-hit != 'true' ||
307333
steps.cache-node-modules.outputs.cache-hit != 'true'
334+
308335
- name: Test
309336
env:
310337
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}

0 commit comments

Comments
 (0)