Skip to content

Commit

Permalink
fix: use proper path and node version in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Mar 17, 2022
1 parent c6f6368 commit d5d546e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: ${{ matrix.node-version }}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down
6 changes: 3 additions & 3 deletions lib/content/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '*'
{{#if pkgRelPath}}
paths:
- {{pkgRelPath}}
- {{pkgRelPath}}/**
{{/if}}
push:
branches:
Expand All @@ -16,7 +16,7 @@ on:
{{/each}}
{{#if pkgRelPath}}
paths:
- {{pkgRelPath}}
- {{pkgRelPath}}/**
{{/if}}
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
Expand Down Expand Up @@ -54,6 +54,6 @@ jobs:
shell: $\{{ matrix.platform.shell }}
steps:
{{> setupGit}}
{{> setupNode}}
{{> setupNode nodeVersion="${{ matrix.node-version }}"}}
- run: npm i
- run: npm test --ignore-scripts {{~#if isWorkspace}} -w {{pkgName}}{{/if}}
2 changes: 1 addition & 1 deletion lib/content/setup-node.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- uses: actions/setup-node@v3
with:
node-version: {{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}
node-version: {{#if nodeVersion}}{{nodeVersion}}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down
16 changes: 8 additions & 8 deletions tap-snapshots/test/apply/full-content.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ jobs:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: \${{ matrix.node-version }}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down Expand Up @@ -721,13 +721,13 @@ on:
branches:
- '*'
paths:
- workspaces/b
- workspaces/b/**
push:
branches:
- main
- latest
paths:
- workspaces/b
- workspaces/b/**
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"
Expand Down Expand Up @@ -795,7 +795,7 @@ jobs:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: \${{ matrix.node-version }}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down Expand Up @@ -829,13 +829,13 @@ on:
branches:
- '*'
paths:
- workspaces/a
- workspaces/a/**
push:
branches:
- main
- latest
paths:
- workspaces/a
- workspaces/a/**
schedule:
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
- cron: "0 2 * * 1"
Expand Down Expand Up @@ -903,7 +903,7 @@ jobs:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: \${{ matrix.node-version }}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down Expand Up @@ -1007,7 +1007,7 @@ jobs:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: \${{ matrix.node-version }}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down
2 changes: 1 addition & 1 deletion tap-snapshots/test/check/diffs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ The repo file ci.yml needs to be updated:
git config --global user.name "npm cli ops bot"
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: \${{ matrix.node-version }}
+ - name: Update to workable npm (windows)
+ # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
+ if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
Expand Down

0 comments on commit d5d546e

Please sign in to comment.