From abfbc7517f718294c6045942d3274d5592b45cb0 Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 12:10:15 -0500 Subject: [PATCH 1/8] fix smokes --- .github/workflows/ci-release.yml | 72 ++++++++++++++-- scripts/publish-dry.sh | 82 +++++++++++++++++++ .../{smoke-publish-test.sh => smoke-tests.sh} | 2 +- 3 files changed, 150 insertions(+), 6 deletions(-) create mode 100755 scripts/publish-dry.sh rename scripts/{smoke-publish-test.sh => smoke-tests.sh} (97%) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 087ce1b56c90f..d4c3254d5ec0c 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -144,13 +144,75 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ steps.create-check.outputs.check-id }} - - smoke-publish: + + smoke-tests: + # 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 Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }} + if: github.repository_owner == 'npm' + strategy: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 18.17.0 + - 18.x + - 20.5.0 + - 20.x + - 22.x + runs-on: ${{ matrix.platform.os }} + defaults: + run: + shell: ${{ matrix.platform.shell }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Setup Git User + run: | + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} + - name: Setup Node + uses: actions/setup-node@v4 + id: node + with: + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') + cache: npm + - name: Check Git Status + run: node scripts/git-dirty.js + - name: Reset Deps + run: node scripts/resetdeps.js + - name: Smoke Publish + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} + + publish-dryrun: # 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 }} + name: Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' strategy: fail-fast: false @@ -182,7 +244,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -197,7 +259,7 @@ jobs: - name: Reset Deps run: node scripts/resetdeps.js - name: Smoke Publish - run: ./scripts/smoke-publish-test.sh + run: ./scripts/publish-dryrun.sh - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/scripts/publish-dry.sh b/scripts/publish-dry.sh new file mode 100755 index 0000000000000..ae4f10481d235 --- /dev/null +++ b/scripts/publish-dry.sh @@ -0,0 +1,82 @@ + #!/usr/bin/env bash + +set -eo pipefail + +IS_LOCAL="false" +IS_CI="true" + +if [ -z "$CI" ]; then + echo "Running locally will overwrite your globally installed npm." + GITHUB_SHA=$(git rev-parse HEAD) + RUNNER_TEMP=$(mktemp -d) + IS_LOCAL="true" + IS_CI="false" +fi + +if [ -z "$GITHUB_SHA" ]; then + echo "Error: GITHUB_SHA is required" + exit 1 +fi + +if [ -z "$RUNNER_TEMP" ]; then + echo "Error: RUNNER_TEMP is required" + exit 1 +fi + +ORIGINAL_GLOBAL_NPM_VERSION=$(npm --version) +if [ ${#ORIGINAL_GLOBAL_NPM_VERSION} -gt 40 ]; then + echo "Error: Global npm version already contains a git SHA ${ORIGINAL_GLOBAL_NPM_VERSION}" + exit 1 +fi + +ORIGINAL_LOCAL_NPM_VERSION=$(node . --version) +if [ ${#ORIGINAL_LOCAL_NPM_VERSION} -gt 40 ]; then + echo "Error: Local npm version already contains a git SHA ${ORIGINAL_LOCAL_NPM_VERSION}" + exit 1 +fi +NPM_VERSION="$ORIGINAL_LOCAL_NPM_VERSION-$GITHUB_SHA.0" + +# Only cleanup locally +if [ "$IS_LOCAL" == "true" ]; then + function cleanup { + npm pkg set version=$ORIGINAL_LOCAL_NPM_VERSION + node scripts/resetdeps.js + if [ "$(git rev-parse HEAD)" != "$GITHUB_SHA" ]; then + echo "===================================" + echo "===================================" + echo "HEAD is on a different commit." + echo "===================================" + echo "===================================" + fi + if [ "$(npm --version)" == "$NPM_VERSION" ]; then + echo "===================================" + echo "===================================" + echo "Global npm version has changed to $NPM_VERSION" + echo "Run the following to change it back" + echo "npm install npm@$ORIGINAL_GLOBAL_NPM_VERSION -g" + echo "===================================" + echo "===================================" + fi + } + trap cleanup EXIT +fi + +# Version the local source of npm with the current git sha and +# and pack and install it globally the same way we would if we +# were publishing it to the registry. The only difference is in the +# publish.js script which will only pack and not publish +node . version $NPM_VERSION --ignore-scripts --git-tag-version="$IS_CI" +node . pack . --pack-destination "$RUNNER_TEMP" +NPM_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" +node . install --global $NPM_TARBALL + +# Only run the tests if we are sure we have the right version +# otherwise the tests being run are pointless +NPM_GLOBAL_VERSION="$(npm --version)" +if [ "$NPM_GLOBAL_VERSION" != "$NPM_VERSION" ]; then + echo "global npm is not the correct version for smoke-publish" + echo "found: $NPM_GLOBAL_VERSION, expected: $NPM_VERSION" + exit 1 +fi + +node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true diff --git a/scripts/smoke-publish-test.sh b/scripts/smoke-tests.sh similarity index 97% rename from scripts/smoke-publish-test.sh rename to scripts/smoke-tests.sh index 5de4f32931cf7..0acda09c26b38 100755 --- a/scripts/smoke-publish-test.sh +++ b/scripts/smoke-tests.sh @@ -66,7 +66,7 @@ fi # were publishing it to the registry. The only difference is in the # publish.js script which will only pack and not publish node . version $NPM_VERSION --ignore-scripts --git-tag-version="$IS_CI" -node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true +node . pack . --pack-destination "$RUNNER_TEMP" NPM_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" node . install --global $NPM_TARBALL From fab233d013eb84da37d75685ef5a5793cffa6727 Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 12:19:27 -0500 Subject: [PATCH 2/8] fix run --- package-lock.json | 216 +++++++++++++++++- scripts/{publish-dry.sh => publish-dryrun.sh} | 0 workspaces/arborist/package.json | 2 +- workspaces/config/package.json | 2 +- workspaces/libnpmaccess/package.json | 2 +- workspaces/libnpmdiff/package.json | 2 +- workspaces/libnpmexec/package.json | 2 +- workspaces/libnpmfund/package.json | 2 +- workspaces/libnpmorg/package.json | 2 +- workspaces/libnpmpack/package.json | 2 +- workspaces/libnpmpublish/package.json | 2 +- workspaces/libnpmsearch/package.json | 2 +- workspaces/libnpmteam/package.json | 2 +- workspaces/libnpmversion/package.json | 2 +- 14 files changed, 216 insertions(+), 24 deletions(-) rename scripts/{publish-dry.sh => publish-dryrun.sh} (100%) diff --git a/package-lock.json b/package-lock.json index 4d73307305e2d..18b1a46706665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18750,7 +18750,7 @@ }, "workspaces/arborist": { "name": "@npmcli/arborist", - "version": "9.0.0", + "version": "9.0.1-smoke.0", "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -18808,7 +18808,7 @@ }, "workspaces/config": { "name": "@npmcli/config", - "version": "10.0.0", + "version": "10.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/map-workspaces": "^4.0.1", @@ -18831,7 +18831,7 @@ } }, "workspaces/libnpmaccess": { - "version": "10.0.0", + "version": "10.0.1-smoke.0", "license": "ISC", "dependencies": { "npm-package-arg": "^12.0.0", @@ -18848,7 +18848,7 @@ } }, "workspaces/libnpmdiff": { - "version": "8.0.0", + "version": "8.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -18869,8 +18869,56 @@ "node": "^20.17.0 || >=22.9.0" } }, + "workspaces/libnpmdiff/node_modules/@npmcli/arborist": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", + "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^9.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^8.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^10.2.2", + "minimatch": "^9.0.4", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "workspaces/libnpmexec": { - "version": "10.0.0", + "version": "10.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -18898,8 +18946,56 @@ "node": "^20.17.0 || >=22.9.0" } }, + "workspaces/libnpmexec/node_modules/@npmcli/arborist": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", + "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^9.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^8.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^10.2.2", + "minimatch": "^9.0.4", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "workspaces/libnpmfund": { - "version": "7.0.0", + "version": "7.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0" @@ -18913,8 +19009,56 @@ "node": "^20.17.0 || >=22.9.0" } }, + "workspaces/libnpmfund/node_modules/@npmcli/arborist": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", + "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^9.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^8.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^10.2.2", + "minimatch": "^9.0.4", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "workspaces/libnpmorg": { - "version": "8.0.0", + "version": "8.0.1-smoke.0", "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -18932,7 +19076,7 @@ } }, "workspaces/libnpmpack": { - "version": "9.0.0", + "version": "9.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -18951,8 +19095,56 @@ "node": "^20.17.0 || >=22.9.0" } }, + "workspaces/libnpmpack/node_modules/@npmcli/arborist": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", + "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^9.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^8.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^10.2.2", + "minimatch": "^9.0.4", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^21.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "read-package-json-fast": "^4.0.0", + "semver": "^7.3.7", + "ssri": "^12.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "workspaces/libnpmpublish": { - "version": "11.0.0", + "version": "11.0.1-smoke.0", "license": "ISC", "dependencies": { "ci-info": "^4.0.0", @@ -18976,7 +19168,7 @@ } }, "workspaces/libnpmsearch": { - "version": "9.0.0", + "version": "9.0.1-smoke.0", "license": "ISC", "dependencies": { "npm-registry-fetch": "^18.0.1" @@ -18992,7 +19184,7 @@ } }, "workspaces/libnpmteam": { - "version": "8.0.0", + "version": "8.0.1-smoke.0", "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -19009,7 +19201,7 @@ } }, "workspaces/libnpmversion": { - "version": "8.0.0", + "version": "8.0.1-smoke.0", "license": "ISC", "dependencies": { "@npmcli/git": "^6.0.1", diff --git a/scripts/publish-dry.sh b/scripts/publish-dryrun.sh similarity index 100% rename from scripts/publish-dry.sh rename to scripts/publish-dryrun.sh diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index a8c9ae0415244..7bb2da9c9c20a 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "9.0.0", + "version": "9.0.1-smoke.0", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", diff --git a/workspaces/config/package.json b/workspaces/config/package.json index eb89879ffe52f..53bad07ebf0d5 100644 --- a/workspaces/config/package.json +++ b/workspaces/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.0.0", + "version": "10.0.1-smoke.0", "files": [ "bin/", "lib/" diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json index ff63233c48871..d35e5aa3f6421 100644 --- a/workspaces/libnpmaccess/package.json +++ b/workspaces/libnpmaccess/package.json @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "10.0.0", + "version": "10.0.1-smoke.0", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index 48673c03ff4c7..dbd55f5b94ed6 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "8.0.0", + "version": "8.0.1-smoke.0", "description": "The registry diff", "repository": { "type": "git", diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 5009d76d12fe5..932a1a91bc6aa 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "10.0.0", + "version": "10.0.1-smoke.0", "files": [ "bin/", "lib/" diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index 8d458259abd6b..4eb241968b5c2 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "7.0.0", + "version": "7.0.1-smoke.0", "main": "lib/index.js", "files": [ "bin/", diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json index aec1ef79791c8..296c1d023733f 100644 --- a/workspaces/libnpmorg/package.json +++ b/workspaces/libnpmorg/package.json @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "8.0.0", + "version": "8.0.1-smoke.0", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index eba99bd38a9bc..d19db5f0b2461 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "9.0.0", + "version": "9.0.1-smoke.0", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index 87526bdd88ca0..27dbc7724f058 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "11.0.0", + "version": "11.0.1-smoke.0", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json index ca021f2414440..3cd2977c1f58f 100644 --- a/workspaces/libnpmsearch/package.json +++ b/workspaces/libnpmsearch/package.json @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "9.0.0", + "version": "9.0.1-smoke.0", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json index 72858f25c2f16..f2ef96bc6c0e0 100644 --- a/workspaces/libnpmteam/package.json +++ b/workspaces/libnpmteam/package.json @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "8.0.0", + "version": "8.0.1-smoke.0", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json index b319156a18fc9..9043512b3d6ac 100644 --- a/workspaces/libnpmversion/package.json +++ b/workspaces/libnpmversion/package.json @@ -1,6 +1,6 @@ { "name": "libnpmversion", - "version": "8.0.0", + "version": "8.0.1-smoke.0", "main": "lib/index.js", "files": [ "bin/", From 4ab57e51589a70d0d75cdf50fa42d7490b8677af Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 12:31:12 -0500 Subject: [PATCH 3/8] undo package changes --- package-lock.json | 216 ++------------------------ workspaces/arborist/package.json | 2 +- workspaces/config/package.json | 2 +- workspaces/libnpmaccess/package.json | 2 +- workspaces/libnpmdiff/package.json | 2 +- workspaces/libnpmexec/package.json | 2 +- workspaces/libnpmfund/package.json | 2 +- workspaces/libnpmorg/package.json | 2 +- workspaces/libnpmpack/package.json | 2 +- workspaces/libnpmpublish/package.json | 2 +- workspaces/libnpmsearch/package.json | 2 +- workspaces/libnpmteam/package.json | 2 +- workspaces/libnpmversion/package.json | 2 +- 13 files changed, 24 insertions(+), 216 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18b1a46706665..4d73307305e2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18750,7 +18750,7 @@ }, "workspaces/arborist": { "name": "@npmcli/arborist", - "version": "9.0.1-smoke.0", + "version": "9.0.0", "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", @@ -18808,7 +18808,7 @@ }, "workspaces/config": { "name": "@npmcli/config", - "version": "10.0.1-smoke.0", + "version": "10.0.0", "license": "ISC", "dependencies": { "@npmcli/map-workspaces": "^4.0.1", @@ -18831,7 +18831,7 @@ } }, "workspaces/libnpmaccess": { - "version": "10.0.1-smoke.0", + "version": "10.0.0", "license": "ISC", "dependencies": { "npm-package-arg": "^12.0.0", @@ -18848,7 +18848,7 @@ } }, "workspaces/libnpmdiff": { - "version": "8.0.1-smoke.0", + "version": "8.0.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -18869,56 +18869,8 @@ "node": "^20.17.0 || >=22.9.0" } }, - "workspaces/libnpmdiff/node_modules/@npmcli/arborist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", - "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^4.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/map-workspaces": "^4.0.1", - "@npmcli/metavuln-calculator": "^9.0.0", - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.1", - "@npmcli/query": "^4.0.0", - "@npmcli/redact": "^3.0.0", - "@npmcli/run-script": "^9.0.1", - "bin-links": "^5.0.0", - "cacache": "^19.0.1", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^8.0.0", - "json-stringify-nice": "^1.1.4", - "lru-cache": "^10.2.2", - "minimatch": "^9.0.4", - "nopt": "^8.0.0", - "npm-install-checks": "^7.1.0", - "npm-package-arg": "^12.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.1", - "pacote": "^21.0.0", - "parse-conflict-json": "^4.0.0", - "proc-log": "^5.0.0", - "proggy": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^4.0.0", - "semver": "^7.3.7", - "ssri": "^12.0.0", - "treeverse": "^3.0.0", - "walk-up-path": "^4.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "workspaces/libnpmexec": { - "version": "10.0.1-smoke.0", + "version": "10.0.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -18946,56 +18898,8 @@ "node": "^20.17.0 || >=22.9.0" } }, - "workspaces/libnpmexec/node_modules/@npmcli/arborist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", - "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^4.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/map-workspaces": "^4.0.1", - "@npmcli/metavuln-calculator": "^9.0.0", - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.1", - "@npmcli/query": "^4.0.0", - "@npmcli/redact": "^3.0.0", - "@npmcli/run-script": "^9.0.1", - "bin-links": "^5.0.0", - "cacache": "^19.0.1", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^8.0.0", - "json-stringify-nice": "^1.1.4", - "lru-cache": "^10.2.2", - "minimatch": "^9.0.4", - "nopt": "^8.0.0", - "npm-install-checks": "^7.1.0", - "npm-package-arg": "^12.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.1", - "pacote": "^21.0.0", - "parse-conflict-json": "^4.0.0", - "proc-log": "^5.0.0", - "proggy": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^4.0.0", - "semver": "^7.3.7", - "ssri": "^12.0.0", - "treeverse": "^3.0.0", - "walk-up-path": "^4.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "workspaces/libnpmfund": { - "version": "7.0.1-smoke.0", + "version": "7.0.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0" @@ -19009,56 +18913,8 @@ "node": "^20.17.0 || >=22.9.0" } }, - "workspaces/libnpmfund/node_modules/@npmcli/arborist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", - "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^4.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/map-workspaces": "^4.0.1", - "@npmcli/metavuln-calculator": "^9.0.0", - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.1", - "@npmcli/query": "^4.0.0", - "@npmcli/redact": "^3.0.0", - "@npmcli/run-script": "^9.0.1", - "bin-links": "^5.0.0", - "cacache": "^19.0.1", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^8.0.0", - "json-stringify-nice": "^1.1.4", - "lru-cache": "^10.2.2", - "minimatch": "^9.0.4", - "nopt": "^8.0.0", - "npm-install-checks": "^7.1.0", - "npm-package-arg": "^12.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.1", - "pacote": "^21.0.0", - "parse-conflict-json": "^4.0.0", - "proc-log": "^5.0.0", - "proggy": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^4.0.0", - "semver": "^7.3.7", - "ssri": "^12.0.0", - "treeverse": "^3.0.0", - "walk-up-path": "^4.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "workspaces/libnpmorg": { - "version": "8.0.1-smoke.0", + "version": "8.0.0", "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -19076,7 +18932,7 @@ } }, "workspaces/libnpmpack": { - "version": "9.0.1-smoke.0", + "version": "9.0.0", "license": "ISC", "dependencies": { "@npmcli/arborist": "^9.0.0", @@ -19095,56 +18951,8 @@ "node": "^20.17.0 || >=22.9.0" } }, - "workspaces/libnpmpack/node_modules/@npmcli/arborist": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.0.0.tgz", - "integrity": "sha512-ZFsI/VJ7wJ2rTksLNJ9xqr75Ste/wiKvW+7w12ZGbcT67xWii97yS+aDlh3edNhqlqoXvdzYG4hTNui81VxJCA==", - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^4.0.0", - "@npmcli/installed-package-contents": "^3.0.0", - "@npmcli/map-workspaces": "^4.0.1", - "@npmcli/metavuln-calculator": "^9.0.0", - "@npmcli/name-from-folder": "^3.0.0", - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.1", - "@npmcli/query": "^4.0.0", - "@npmcli/redact": "^3.0.0", - "@npmcli/run-script": "^9.0.1", - "bin-links": "^5.0.0", - "cacache": "^19.0.1", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^8.0.0", - "json-stringify-nice": "^1.1.4", - "lru-cache": "^10.2.2", - "minimatch": "^9.0.4", - "nopt": "^8.0.0", - "npm-install-checks": "^7.1.0", - "npm-package-arg": "^12.0.0", - "npm-pick-manifest": "^10.0.0", - "npm-registry-fetch": "^18.0.1", - "pacote": "^21.0.0", - "parse-conflict-json": "^4.0.0", - "proc-log": "^5.0.0", - "proggy": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^4.0.0", - "semver": "^7.3.7", - "ssri": "^12.0.0", - "treeverse": "^3.0.0", - "walk-up-path": "^4.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "workspaces/libnpmpublish": { - "version": "11.0.1-smoke.0", + "version": "11.0.0", "license": "ISC", "dependencies": { "ci-info": "^4.0.0", @@ -19168,7 +18976,7 @@ } }, "workspaces/libnpmsearch": { - "version": "9.0.1-smoke.0", + "version": "9.0.0", "license": "ISC", "dependencies": { "npm-registry-fetch": "^18.0.1" @@ -19184,7 +18992,7 @@ } }, "workspaces/libnpmteam": { - "version": "8.0.1-smoke.0", + "version": "8.0.0", "license": "ISC", "dependencies": { "aproba": "^2.0.0", @@ -19201,7 +19009,7 @@ } }, "workspaces/libnpmversion": { - "version": "8.0.1-smoke.0", + "version": "8.0.0", "license": "ISC", "dependencies": { "@npmcli/git": "^6.0.1", diff --git a/workspaces/arborist/package.json b/workspaces/arborist/package.json index 7bb2da9c9c20a..a8c9ae0415244 100644 --- a/workspaces/arborist/package.json +++ b/workspaces/arborist/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/arborist", - "version": "9.0.1-smoke.0", + "version": "9.0.0", "description": "Manage node_modules trees", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", diff --git a/workspaces/config/package.json b/workspaces/config/package.json index 53bad07ebf0d5..eb89879ffe52f 100644 --- a/workspaces/config/package.json +++ b/workspaces/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "10.0.1-smoke.0", + "version": "10.0.0", "files": [ "bin/", "lib/" diff --git a/workspaces/libnpmaccess/package.json b/workspaces/libnpmaccess/package.json index d35e5aa3f6421..ff63233c48871 100644 --- a/workspaces/libnpmaccess/package.json +++ b/workspaces/libnpmaccess/package.json @@ -1,6 +1,6 @@ { "name": "libnpmaccess", - "version": "10.0.1-smoke.0", + "version": "10.0.0", "description": "programmatic library for `npm access` commands", "author": "GitHub Inc.", "license": "ISC", diff --git a/workspaces/libnpmdiff/package.json b/workspaces/libnpmdiff/package.json index dbd55f5b94ed6..48673c03ff4c7 100644 --- a/workspaces/libnpmdiff/package.json +++ b/workspaces/libnpmdiff/package.json @@ -1,6 +1,6 @@ { "name": "libnpmdiff", - "version": "8.0.1-smoke.0", + "version": "8.0.0", "description": "The registry diff", "repository": { "type": "git", diff --git a/workspaces/libnpmexec/package.json b/workspaces/libnpmexec/package.json index 932a1a91bc6aa..5009d76d12fe5 100644 --- a/workspaces/libnpmexec/package.json +++ b/workspaces/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "10.0.1-smoke.0", + "version": "10.0.0", "files": [ "bin/", "lib/" diff --git a/workspaces/libnpmfund/package.json b/workspaces/libnpmfund/package.json index 4eb241968b5c2..8d458259abd6b 100644 --- a/workspaces/libnpmfund/package.json +++ b/workspaces/libnpmfund/package.json @@ -1,6 +1,6 @@ { "name": "libnpmfund", - "version": "7.0.1-smoke.0", + "version": "7.0.0", "main": "lib/index.js", "files": [ "bin/", diff --git a/workspaces/libnpmorg/package.json b/workspaces/libnpmorg/package.json index 296c1d023733f..aec1ef79791c8 100644 --- a/workspaces/libnpmorg/package.json +++ b/workspaces/libnpmorg/package.json @@ -1,6 +1,6 @@ { "name": "libnpmorg", - "version": "8.0.1-smoke.0", + "version": "8.0.0", "description": "Programmatic api for `npm org` commands", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmpack/package.json b/workspaces/libnpmpack/package.json index d19db5f0b2461..eba99bd38a9bc 100644 --- a/workspaces/libnpmpack/package.json +++ b/workspaces/libnpmpack/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpack", - "version": "9.0.1-smoke.0", + "version": "9.0.0", "description": "Programmatic API for the bits behind npm pack", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmpublish/package.json b/workspaces/libnpmpublish/package.json index 27dbc7724f058..87526bdd88ca0 100644 --- a/workspaces/libnpmpublish/package.json +++ b/workspaces/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "11.0.1-smoke.0", + "version": "11.0.0", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmsearch/package.json b/workspaces/libnpmsearch/package.json index 3cd2977c1f58f..ca021f2414440 100644 --- a/workspaces/libnpmsearch/package.json +++ b/workspaces/libnpmsearch/package.json @@ -1,6 +1,6 @@ { "name": "libnpmsearch", - "version": "9.0.1-smoke.0", + "version": "9.0.0", "description": "Programmatic API for searching in npm and compatible registries.", "author": "GitHub Inc.", "main": "lib/index.js", diff --git a/workspaces/libnpmteam/package.json b/workspaces/libnpmteam/package.json index f2ef96bc6c0e0..72858f25c2f16 100644 --- a/workspaces/libnpmteam/package.json +++ b/workspaces/libnpmteam/package.json @@ -1,7 +1,7 @@ { "name": "libnpmteam", "description": "npm Team management APIs", - "version": "8.0.1-smoke.0", + "version": "8.0.0", "author": "GitHub Inc.", "license": "ISC", "main": "lib/index.js", diff --git a/workspaces/libnpmversion/package.json b/workspaces/libnpmversion/package.json index 9043512b3d6ac..b319156a18fc9 100644 --- a/workspaces/libnpmversion/package.json +++ b/workspaces/libnpmversion/package.json @@ -1,6 +1,6 @@ { "name": "libnpmversion", - "version": "8.0.1-smoke.0", + "version": "8.0.0", "main": "lib/index.js", "files": [ "bin/", From e35c62b5b465ab1f211a6c0f144266994afe743b Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 12:40:53 -0500 Subject: [PATCH 4/8] use hbs template --- .github/workflows/ci-release.yml | 37 +++++++------- scripts/template-oss/ci-release-yml.hbs | 66 ++++++++++++++++--------- 2 files changed, 62 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index d4c3254d5ec0c..93c0ca3934af5 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -144,13 +144,13 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ steps.create-check.outputs.check-id }} - + smoke-tests: - # 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 Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }} + # 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: fail-fast: false @@ -160,10 +160,9 @@ jobs: os: ubuntu-latest shell: bash node-version: - - 18.17.0 - - 18.x - - 20.5.0 + - 20.17.0 - 20.x + - 22.9.0 - 22.x runs-on: ${{ matrix.platform.os }} defaults: @@ -183,7 +182,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -197,7 +196,7 @@ jobs: run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - - name: Smoke Publish + - name: Smoke Tests run: ./scripts/smoke-tests.sh - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 @@ -206,13 +205,13 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} conclusion: ${{ job.status }} check_id: ${{ steps.create-check.outputs.check-id }} - + publish-dryrun: - # 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: Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }} + # 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: fail-fast: false @@ -244,7 +243,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Publish dry-run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -258,7 +257,7 @@ jobs: run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - - name: Smoke Publish + - name: Publish Dry-Run run: ./scripts/publish-dryrun.sh - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 diff --git a/scripts/template-oss/ci-release-yml.hbs b/scripts/template-oss/ci-release-yml.hbs index 8ff869812a331..4b0d99495c604 100644 --- a/scripts/template-oss/ci-release-yml.hbs +++ b/scripts/template-oss/ci-release-yml.hbs @@ -1,23 +1,45 @@ -{{> ciReleaseYml }} +{{> ciReleaseYml }} - 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. - {{> jobMatrixYml - jobName="Smoke Publish" - jobCheckout=(obj ref="${{ inputs.ref }}") - jobCreateCheck=(obj sha="${{ inputs.check-sha }}") - windowsCI=false - macCI=false - }} - - name: Smoke Publish - run: ./scripts/smoke-publish-test.sh - - name: Conclude Check - uses: LouisBrunner/checks-action@v1.6.0 - if: steps.create-check.outputs.check-id && always() - with: - token: $\{{ secrets.GITHUB_TOKEN }} - conclusion: $\{{ job.status }} - check_id: $\{{ steps.create-check.outputs.check-id }} + smoke-tests: + # 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. + {{> jobMatrixYml + jobName="Smoke Publish" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # 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. + {{> jobMatrixYml + jobName="Smoke Publish" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Publish Dry-Run + run: ./scripts/publish-dryrun.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} \ No newline at end of file From 9d4a12346f40e6723c48b96c4103bc799f160def Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 12:55:04 -0500 Subject: [PATCH 5/8] chore: run smoke tests and publish dryrun on pr --- .github/workflows/ci.yml | 106 +++++++++++++++++++++++++++++--- scripts/template-oss/ci-yml.hbs | 49 +++++++++++++-- 2 files changed, 142 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb754da8e6111..04df3650a7a86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,34 +147,126 @@ jobs: run: node . run licenses smoke-tests: - name: Smoke Tests + # 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' - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 20.17.0 + - 20.x + - 22.9.0 + - 22.x + runs-on: ${{ matrix.platform.os }} defaults: run: - shell: bash + shell: ${{ matrix.platform.shell }} steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: 22.x - check-latest: contains('22.x', '.x') + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - - name: Run Smoke Tests - run: node . test -w smoke-tests --ignore-scripts + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # 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: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 20.17.0 + - 20.x + - 22.9.0 + - 22.x + runs-on: ${{ matrix.platform.os }} + defaults: + run: + shell: ${{ matrix.platform.shell }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + - name: Setup Git User + run: | + git config --global user.email "npm-cli+bot@github.com" + git config --global user.name "npm CLI robot" + - name: Create Check + id: create-check + if: ${{ inputs.check-sha }} + uses: ./.github/actions/create-check + with: + name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + token: ${{ secrets.GITHUB_TOKEN }} + sha: ${{ inputs.check-sha }} + - name: Setup Node + uses: actions/setup-node@v4 + id: node + with: + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') + cache: npm - name: Check Git Status run: node scripts/git-dirty.js + - name: Reset Deps + run: node scripts/resetdeps.js + - name: Publish Dry-Run + run: ./scripts/publish-dryrun.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + conclusion: ${{ job.status }} + check_id: ${{ steps.create-check.outputs.check-id }} windows-shims: name: Windows Shims Tests diff --git a/scripts/template-oss/ci-yml.hbs b/scripts/template-oss/ci-yml.hbs index bdd4e3b5ccab5..71eb164cb4f50 100644 --- a/scripts/template-oss/ci-yml.hbs +++ b/scripts/template-oss/ci-yml.hbs @@ -5,12 +5,49 @@ - name: Check Licenses run: {{rootNpmPath}} run licenses - smoke-tests: - {{> jobYml jobName="Smoke Tests" }} - - name: Run Smoke Tests - run: {{rootNpmPath}} test -w smoke-tests --ignore-scripts - - name: Check Git Status - run: node scripts/git-dirty.js + smoke-tests: + # 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. + {{> jobMatrixYml + jobName="Smoke Publish" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Smoke Tests + run: ./scripts/smoke-tests.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} + + publish-dryrun: + # 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. + {{> jobMatrixYml + jobName="Smoke Publish" + jobCheckout=(obj ref="${{ inputs.ref }}") + jobCreateCheck=(obj sha="${{ inputs.check-sha }}") + windowsCI=false + macCI=false + }} + - name: Publish Dry-Run + run: ./scripts/publish-dryrun.sh + - name: Conclude Check + uses: LouisBrunner/checks-action@v1.6.0 + if: steps.create-check.outputs.check-id && always() + with: + token: $\{{ secrets.GITHUB_TOKEN }} + conclusion: $\{{ job.status }} + check_id: $\{{ steps.create-check.outputs.check-id }} windows-shims: name: Windows Shims Tests From ade331d7eca7db0d5c69ce3995b95294b1b129c6 Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 16:16:45 -0500 Subject: [PATCH 6/8] removes matrix, and publish dry-run --- .github/workflows/ci-release.yml | 50 ++++----------- .github/workflows/ci.yml | 50 ++++----------- scripts/publish-dryrun.sh | 82 ------------------------- scripts/template-oss/ci-release-yml.hbs | 6 +- scripts/template-oss/ci-yml.hbs | 6 +- 5 files changed, 32 insertions(+), 162 deletions(-) delete mode 100755 scripts/publish-dryrun.sh diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 93c0ca3934af5..4e35859197c9b 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -150,24 +150,12 @@ jobs: # 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 }} + name: Smoke Publish if: github.repository_owner == 'npm' - strategy: - fail-fast: false - matrix: - platform: - - name: Linux - os: ubuntu-latest - shell: bash - node-version: - - 20.17.0 - - 20.x - - 22.9.0 - - 22.x - runs-on: ${{ matrix.platform.os }} + runs-on: ubuntu-latest defaults: run: - shell: ${{ matrix.platform.shell }} + shell: bash steps: - name: Checkout uses: actions/checkout@v4 @@ -182,15 +170,15 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: ${{ matrix.node-version }} - check-latest: contains(matrix.node-version, '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js @@ -211,24 +199,12 @@ jobs: # 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 }} + name: Smoke Publish if: github.repository_owner == 'npm' - strategy: - fail-fast: false - matrix: - platform: - - name: Linux - os: ubuntu-latest - shell: bash - node-version: - - 20.17.0 - - 20.x - - 22.9.0 - - 22.x - runs-on: ${{ matrix.platform.os }} + runs-on: ubuntu-latest defaults: run: - shell: ${{ matrix.platform.shell }} + shell: bash steps: - name: Checkout uses: actions/checkout@v4 @@ -243,22 +219,22 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: ${{ matrix.node-version }} - check-latest: contains(matrix.node-version, '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - name: Publish Dry-Run - run: ./scripts/publish-dryrun.sh + run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04df3650a7a86..0f2d5798252b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,24 +151,12 @@ jobs: # 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 }} + name: Smoke Publish if: github.repository_owner == 'npm' - strategy: - fail-fast: false - matrix: - platform: - - name: Linux - os: ubuntu-latest - shell: bash - node-version: - - 20.17.0 - - 20.x - - 22.9.0 - - 22.x - runs-on: ${{ matrix.platform.os }} + runs-on: ubuntu-latest defaults: run: - shell: ${{ matrix.platform.shell }} + shell: bash steps: - name: Checkout uses: actions/checkout@v4 @@ -183,15 +171,15 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: ${{ matrix.node-version }} - check-latest: contains(matrix.node-version, '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js @@ -212,24 +200,12 @@ jobs: # 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 }} + name: Smoke Publish if: github.repository_owner == 'npm' - strategy: - fail-fast: false - matrix: - platform: - - name: Linux - os: ubuntu-latest - shell: bash - node-version: - - 20.17.0 - - 20.x - - 22.9.0 - - 22.x - runs-on: ${{ matrix.platform.os }} + runs-on: ubuntu-latest defaults: run: - shell: ${{ matrix.platform.shell }} + shell: bash steps: - name: Checkout uses: actions/checkout@v4 @@ -244,22 +220,22 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" + name: "Smoke Publish" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: ${{ matrix.node-version }} - check-latest: contains(matrix.node-version, '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - name: Publish Dry-Run - run: ./scripts/publish-dryrun.sh + run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/scripts/publish-dryrun.sh b/scripts/publish-dryrun.sh deleted file mode 100755 index ae4f10481d235..0000000000000 --- a/scripts/publish-dryrun.sh +++ /dev/null @@ -1,82 +0,0 @@ - #!/usr/bin/env bash - -set -eo pipefail - -IS_LOCAL="false" -IS_CI="true" - -if [ -z "$CI" ]; then - echo "Running locally will overwrite your globally installed npm." - GITHUB_SHA=$(git rev-parse HEAD) - RUNNER_TEMP=$(mktemp -d) - IS_LOCAL="true" - IS_CI="false" -fi - -if [ -z "$GITHUB_SHA" ]; then - echo "Error: GITHUB_SHA is required" - exit 1 -fi - -if [ -z "$RUNNER_TEMP" ]; then - echo "Error: RUNNER_TEMP is required" - exit 1 -fi - -ORIGINAL_GLOBAL_NPM_VERSION=$(npm --version) -if [ ${#ORIGINAL_GLOBAL_NPM_VERSION} -gt 40 ]; then - echo "Error: Global npm version already contains a git SHA ${ORIGINAL_GLOBAL_NPM_VERSION}" - exit 1 -fi - -ORIGINAL_LOCAL_NPM_VERSION=$(node . --version) -if [ ${#ORIGINAL_LOCAL_NPM_VERSION} -gt 40 ]; then - echo "Error: Local npm version already contains a git SHA ${ORIGINAL_LOCAL_NPM_VERSION}" - exit 1 -fi -NPM_VERSION="$ORIGINAL_LOCAL_NPM_VERSION-$GITHUB_SHA.0" - -# Only cleanup locally -if [ "$IS_LOCAL" == "true" ]; then - function cleanup { - npm pkg set version=$ORIGINAL_LOCAL_NPM_VERSION - node scripts/resetdeps.js - if [ "$(git rev-parse HEAD)" != "$GITHUB_SHA" ]; then - echo "===================================" - echo "===================================" - echo "HEAD is on a different commit." - echo "===================================" - echo "===================================" - fi - if [ "$(npm --version)" == "$NPM_VERSION" ]; then - echo "===================================" - echo "===================================" - echo "Global npm version has changed to $NPM_VERSION" - echo "Run the following to change it back" - echo "npm install npm@$ORIGINAL_GLOBAL_NPM_VERSION -g" - echo "===================================" - echo "===================================" - fi - } - trap cleanup EXIT -fi - -# Version the local source of npm with the current git sha and -# and pack and install it globally the same way we would if we -# were publishing it to the registry. The only difference is in the -# publish.js script which will only pack and not publish -node . version $NPM_VERSION --ignore-scripts --git-tag-version="$IS_CI" -node . pack . --pack-destination "$RUNNER_TEMP" -NPM_TARBALL="$RUNNER_TEMP/npm-$NPM_VERSION.tgz" -node . install --global $NPM_TARBALL - -# Only run the tests if we are sure we have the right version -# otherwise the tests being run are pointless -NPM_GLOBAL_VERSION="$(npm --version)" -if [ "$NPM_GLOBAL_VERSION" != "$NPM_VERSION" ]; then - echo "global npm is not the correct version for smoke-publish" - echo "found: $NPM_GLOBAL_VERSION, expected: $NPM_VERSION" - exit 1 -fi - -node scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true diff --git a/scripts/template-oss/ci-release-yml.hbs b/scripts/template-oss/ci-release-yml.hbs index 4b0d99495c604..60688d5542eb0 100644 --- a/scripts/template-oss/ci-release-yml.hbs +++ b/scripts/template-oss/ci-release-yml.hbs @@ -5,7 +5,7 @@ # 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. - {{> jobMatrixYml + {{> jobYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -27,7 +27,7 @@ # 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. - {{> jobMatrixYml + {{> jobYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -35,7 +35,7 @@ macCI=false }} - name: Publish Dry-Run - run: ./scripts/publish-dryrun.sh + run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/scripts/template-oss/ci-yml.hbs b/scripts/template-oss/ci-yml.hbs index 71eb164cb4f50..8adcba092c21d 100644 --- a/scripts/template-oss/ci-yml.hbs +++ b/scripts/template-oss/ci-yml.hbs @@ -10,7 +10,7 @@ # 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. - {{> jobMatrixYml + {{> jobYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -32,7 +32,7 @@ # 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. - {{> jobMatrixYml + {{> jobYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -40,7 +40,7 @@ macCI=false }} - name: Publish Dry-Run - run: ./scripts/publish-dryrun.sh + run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() From f5d401a18c381ab6a88acb28ff5535bc23f76800 Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 16:19:13 -0500 Subject: [PATCH 7/8] fix script put back matrix for release only --- scripts/smoke-tests.js | 0 scripts/template-oss/ci-release-yml.hbs | 6 +++--- scripts/template-oss/ci-yml.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 scripts/smoke-tests.js diff --git a/scripts/smoke-tests.js b/scripts/smoke-tests.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/scripts/template-oss/ci-release-yml.hbs b/scripts/template-oss/ci-release-yml.hbs index 60688d5542eb0..b0187d0df1b08 100644 --- a/scripts/template-oss/ci-release-yml.hbs +++ b/scripts/template-oss/ci-release-yml.hbs @@ -5,7 +5,7 @@ # 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. - {{> jobYml + {{> jobMatrixYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -27,7 +27,7 @@ # 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. - {{> jobYml + {{> jobMatrixYml jobName="Smoke Publish" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") @@ -35,7 +35,7 @@ macCI=false }} - name: Publish Dry-Run - run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/scripts/template-oss/ci-yml.hbs b/scripts/template-oss/ci-yml.hbs index 8adcba092c21d..7c35321fdcd50 100644 --- a/scripts/template-oss/ci-yml.hbs +++ b/scripts/template-oss/ci-yml.hbs @@ -40,7 +40,7 @@ macCI=false }} - name: Publish Dry-Run - run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() From cbc895f571a76507de416d9aed9eeb522f2c4f2c Mon Sep 17 00:00:00 2001 From: reggi Date: Tue, 28 Jan 2025 16:20:42 -0500 Subject: [PATCH 8/8] fix names --- .github/workflows/ci-release.yml | 50 ++++++++++++++++++------- .github/workflows/ci.yml | 10 ++--- scripts/template-oss/ci-release-yml.hbs | 4 +- scripts/template-oss/ci-yml.hbs | 4 +- 4 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 4e35859197c9b..edc25fcb4bd67 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -150,12 +150,24 @@ jobs: # 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 + name: Smoke Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 20.17.0 + - 20.x + - 22.9.0 + - 22.x + runs-on: ${{ matrix.platform.os }} defaults: run: - shell: bash + shell: ${{ matrix.platform.shell }} steps: - name: Checkout uses: actions/checkout@v4 @@ -170,15 +182,15 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish" + name: "Smoke Tests - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: 22.x - check-latest: contains('22.x', '.x') + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js @@ -199,12 +211,24 @@ jobs: # 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 + name: Publish Dry-Run - ${{ matrix.platform.name }} - ${{ matrix.node-version }} if: github.repository_owner == 'npm' - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - name: Linux + os: ubuntu-latest + shell: bash + node-version: + - 20.17.0 + - 20.x + - 22.9.0 + - 22.x + runs-on: ${{ matrix.platform.os }} defaults: run: - shell: bash + shell: ${{ matrix.platform.shell }} steps: - name: Checkout uses: actions/checkout@v4 @@ -219,22 +243,22 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish" + name: "Publish Dry-Run - ${{ matrix.platform.name }} - ${{ matrix.node-version }}" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node uses: actions/setup-node@v4 id: node with: - node-version: 22.x - check-latest: contains('22.x', '.x') + node-version: ${{ matrix.node-version }} + check-latest: contains(matrix.node-version, '.x') cache: npm - name: Check Git Status run: node scripts/git-dirty.js - name: Reset Deps run: node scripts/resetdeps.js - name: Publish Dry-Run - run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f2d5798252b5..e53689d0ebedd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: # 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 + name: Smoke Tests if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: @@ -171,7 +171,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish" + name: "Smoke Tests" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -200,7 +200,7 @@ jobs: # 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 + name: Publish Dry-Run if: github.repository_owner == 'npm' runs-on: ubuntu-latest defaults: @@ -220,7 +220,7 @@ jobs: if: ${{ inputs.check-sha }} uses: ./.github/actions/create-check with: - name: "Smoke Publish" + name: "Publish Dry-Run" token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node @@ -235,7 +235,7 @@ jobs: - name: Reset Deps run: node scripts/resetdeps.js - name: Publish Dry-Run - run: node ./publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true + run: node ./scripts/publish.js --pack-destination=$RUNNER_TEMP --smoke-publish=true - name: Conclude Check uses: LouisBrunner/checks-action@v1.6.0 if: steps.create-check.outputs.check-id && always() diff --git a/scripts/template-oss/ci-release-yml.hbs b/scripts/template-oss/ci-release-yml.hbs index b0187d0df1b08..6ec27f1b2e9d2 100644 --- a/scripts/template-oss/ci-release-yml.hbs +++ b/scripts/template-oss/ci-release-yml.hbs @@ -6,7 +6,7 @@ # fixed somehow, because this means some forms of local development # are likely broken on Windows as well. {{> jobMatrixYml - jobName="Smoke Publish" + jobName="Smoke Tests" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") windowsCI=false @@ -28,7 +28,7 @@ # fixed somehow, because this means some forms of local development # are likely broken on Windows as well. {{> jobMatrixYml - jobName="Smoke Publish" + jobName="Publish Dry-Run" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") windowsCI=false diff --git a/scripts/template-oss/ci-yml.hbs b/scripts/template-oss/ci-yml.hbs index 7c35321fdcd50..386a3716deadd 100644 --- a/scripts/template-oss/ci-yml.hbs +++ b/scripts/template-oss/ci-yml.hbs @@ -11,7 +11,7 @@ # fixed somehow, because this means some forms of local development # are likely broken on Windows as well. {{> jobYml - jobName="Smoke Publish" + jobName="Smoke Tests" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") windowsCI=false @@ -33,7 +33,7 @@ # fixed somehow, because this means some forms of local development # are likely broken on Windows as well. {{> jobYml - jobName="Smoke Publish" + jobName="Publish Dry-Run" jobCheckout=(obj ref="${{ inputs.ref }}") jobCreateCheck=(obj sha="${{ inputs.check-sha }}") windowsCI=false