Skip to content

Commit d5d546e

Browse files
committed
fix: use proper path and node version in actions
1 parent c6f6368 commit d5d546e

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
git config --global user.name "npm cli ops bot"
7979
- uses: actions/setup-node@v3
8080
with:
81-
node-version: 16.x
81+
node-version: ${{ matrix.node-version }}
8282
- name: Update to workable npm (windows)
8383
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
8484
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))

lib/content/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- '*'
88
{{#if pkgRelPath}}
99
paths:
10-
- {{pkgRelPath}}
10+
- {{pkgRelPath}}/**
1111
{{/if}}
1212
push:
1313
branches:
@@ -16,7 +16,7 @@ on:
1616
{{/each}}
1717
{{#if pkgRelPath}}
1818
paths:
19-
- {{pkgRelPath}}
19+
- {{pkgRelPath}}/**
2020
{{/if}}
2121
schedule:
2222
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
@@ -54,6 +54,6 @@ jobs:
5454
shell: $\{{ matrix.platform.shell }}
5555
steps:
5656
{{> setupGit}}
57-
{{> setupNode}}
57+
{{> setupNode nodeVersion="${{ matrix.node-version }}"}}
5858
- run: npm i
5959
- run: npm test --ignore-scripts {{~#if isWorkspace}} -w {{pkgName}}{{/if}}

lib/content/setup-node.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- uses: actions/setup-node@v3
22
with:
3-
node-version: {{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}
3+
node-version: {{#if nodeVersion}}{{nodeVersion}}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
44
- name: Update to workable npm (windows)
55
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
66
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))

tap-snapshots/test/apply/full-content.js.test.cjs

+8-8
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ jobs:
252252
git config --global user.name "npm cli ops bot"
253253
- uses: actions/setup-node@v3
254254
with:
255-
node-version: 16.x
255+
node-version: \${{ matrix.node-version }}
256256
- name: Update to workable npm (windows)
257257
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
258258
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
@@ -721,13 +721,13 @@ on:
721721
branches:
722722
- '*'
723723
paths:
724-
- workspaces/b
724+
- workspaces/b/**
725725
push:
726726
branches:
727727
- main
728728
- latest
729729
paths:
730-
- workspaces/b
730+
- workspaces/b/**
731731
schedule:
732732
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
733733
- cron: "0 2 * * 1"
@@ -795,7 +795,7 @@ jobs:
795795
git config --global user.name "npm cli ops bot"
796796
- uses: actions/setup-node@v3
797797
with:
798-
node-version: 16.x
798+
node-version: \${{ matrix.node-version }}
799799
- name: Update to workable npm (windows)
800800
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
801801
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
@@ -829,13 +829,13 @@ on:
829829
branches:
830830
- '*'
831831
paths:
832-
- workspaces/a
832+
- workspaces/a/**
833833
push:
834834
branches:
835835
- main
836836
- latest
837837
paths:
838-
- workspaces/a
838+
- workspaces/a/**
839839
schedule:
840840
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
841841
- cron: "0 2 * * 1"
@@ -903,7 +903,7 @@ jobs:
903903
git config --global user.name "npm cli ops bot"
904904
- uses: actions/setup-node@v3
905905
with:
906-
node-version: 16.x
906+
node-version: \${{ matrix.node-version }}
907907
- name: Update to workable npm (windows)
908908
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
909909
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
@@ -1007,7 +1007,7 @@ jobs:
10071007
git config --global user.name "npm cli ops bot"
10081008
- uses: actions/setup-node@v3
10091009
with:
1010-
node-version: 16.x
1010+
node-version: \${{ matrix.node-version }}
10111011
- name: Update to workable npm (windows)
10121012
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
10131013
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))

tap-snapshots/test/check/diffs.js.test.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ The repo file ci.yml needs to be updated:
299299
git config --global user.name "npm cli ops bot"
300300
- uses: actions/setup-node@v3
301301
with:
302-
node-version: 16.x
302+
node-version: \${{ matrix.node-version }}
303303
+ - name: Update to workable npm (windows)
304304
+ # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
305305
+ if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))

0 commit comments

Comments
 (0)