Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): use globally installed npm executable #5555

Merged
merged 1 commit into from Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci-release.yml
Expand Up @@ -202,14 +202,17 @@ jobs:
node . version $NPM_VERSION --ignore-scripts
node . run resetdeps
git clean -fd
node . ls --production >/dev/null
node . prune --production --no-save --no-audit --no-fund
node . ls --omit=dev >/dev/null
node . prune --omit=dev --no-save --no-audit --no-fund
node scripts/git-dirty.js
node . pack --pack-destination=$RUNNER_TEMP
node . install -g $RUNNER_TEMP/npm-$NPM_VERSION.tgz
node . install -w smoke-tests --ignore-scripts --no-audit --no-fund
rm -rf {lib,bin,index.js}
SMOKE_PUBLISH_NPM=1 node . test -w smoke-tests --ignore-scripts
# this one should be npm since we explicitly installed our packed
# tarball globally and the next test will make sure our the new
# globally installed version contains the git sha
SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Expand Up @@ -39,7 +39,7 @@
"nav.yml"
],
"engines": {
"node": ">=18.0.0"
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
},
"tap": {
"statements": 81,
Expand All @@ -63,6 +63,7 @@
"/nav.yml"
],
"ciVersions": "latest",
"engines": "^14.17.0 || ^16.13.0 || >=18.0.0",
"version": "4.3.2",
"content": "../scripts/template-oss/index.js"
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json
Expand Up @@ -199,7 +199,7 @@
"yaml": "^1.10.0"
},
"engines": {
"node": ">=18.0.0"
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/@actions/core": {
Expand Down
9 changes: 6 additions & 3 deletions scripts/template-oss/ci-release.yml
Expand Up @@ -12,12 +12,15 @@
{{ rootNpmPath }} version $NPM_VERSION --ignore-scripts
{{ rootNpmPath }} run resetdeps
git clean -fd
{{ rootNpmPath }} ls --production >/dev/null
{{ rootNpmPath }} prune --production --no-save --no-audit --no-fund
{{ rootNpmPath }} ls --omit=dev >/dev/null
{{ rootNpmPath }} prune --omit=dev --no-save --no-audit --no-fund
node scripts/git-dirty.js
{{ rootNpmPath }} pack --pack-destination=$RUNNER_TEMP
{{ rootNpmPath }} install -g $RUNNER_TEMP/npm-$NPM_VERSION.tgz
{{ rootNpmPath }} install -w smoke-tests --ignore-scripts --no-audit --no-fund
rm -rf {lib,bin,index.js}
SMOKE_PUBLISH_NPM=1 {{ rootNpmPath }} test -w smoke-tests --ignore-scripts
# this one should be npm since we explicitly installed our packed
# tarball globally and the next test will make sure our the new
# globally installed version contains the git sha
SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
{{> stepChecks jobCheck=true }}