-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add smoke-test that will use current npm source to overwrite i…
…tself (#6491)
- Loading branch information
1 parent
e580d94
commit 1e977ee
Showing
10 changed files
with
262 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,6 +199,10 @@ jobs: | |
check_id: ${{ steps.check.outputs.check_id }} | ||
|
||
smoke-publish: | ||
# This cant be tested on Windows because our node_modules directory | ||
# checks in symlinks which are not supported there. This should be | ||
# fixed somehow, because this means some forms of local development | ||
# are likely broken on Windows as well. | ||
name: Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }} | ||
if: github.repository_owner == 'npm' | ||
strategy: | ||
|
@@ -288,12 +292,20 @@ jobs: | |
NPM_VERSION="$(node . --version)-$GITHUB_SHA.0" | ||
node . version $NPM_VERSION --ignore-scripts | ||
node scripts/publish.js --pack-destination=$RUNNER_TEMP | ||
node . install --global $RUNNER_TEMP/npm-$NPM_VERSION.tgz | ||
export SMOKE_PUBLISH_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" | ||
node . install --global $SMOKE_PUBLISH_TARBALL | ||
node . install -w smoke-tests --ignore-scripts --no-audit --no-fund | ||
node scripts/remove-files.js | ||
# call installed npm instead of local source since we are testing | ||
# the packed tarball that we just installed globally | ||
npm test -w smoke-tests --ignore-scripts | ||
NPM_GLOBAL_VERSION="$(npm --version)" | ||
npm help | ||
if [ "$NPM_GLOBAL_VERSION" == "$NPM_VERSION" ]; then | ||
npm test -w smoke-tests --ignore-scripts | ||
else | ||
echo "global npm is not the correct version for smoke-publish" | ||
echo "found: $NPM_GLOBAL_VERSION, expected: $NPM_VERSION" | ||
exit 1 | ||
fi | ||
- name: Conclude Check | ||
uses: LouisBrunner/[email protected] | ||
if: steps.check.outputs.check_id && always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.