From 5142d23db564aefc90649cde48f65a09e74afafe Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Thu, 17 Oct 2024 12:02:05 -0400 Subject: [PATCH] Use a single Node.js version for test & publish Projects should be opinionated and define the desired node version in .node_version in the root of the project. This is supported natively via the setup-node action to and renovate to auto-detect the version to use. Failing this, we will still fall back to testing with recent LTS releases but only select the first compatible version detected, in decending order (newest first). Change-type: major Signed-off-by: Kyle Harding --- .github/workflows/flowzone.yml | 128 ++++++++++++++------------- flowzone.yml | 153 ++++++++++++++++++++------------- tests/.node-version | 1 + 3 files changed, 163 insertions(+), 119 deletions(-) create mode 100644 tests/.node-version diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index 2f836ed25..28648082e 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -963,7 +963,7 @@ jobs: npm_private: ${{ steps.npm.outputs.private }} npm_docs: ${{ steps.npm.outputs.docs }} npm_sbom: ${{ inputs.generate_sbom }} - node_versions: ${{ steps.node_versions.outputs.json }} + node_version: ${{ steps.node_version.outputs.string }} npm_access: ${{ steps.access.outputs.access }} steps: - name: Generate GitHub App installation token @@ -1019,48 +1019,63 @@ jobs: - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: 18.x + node-version-file: .node-version if: steps.npm.outputs.enabled == 'true' + id: node-version-file + continue-on-error: true + - name: Use ${{ steps.node-version-file.outputs.node-version }} + if: steps.node-version-file.outputs.node-version != '' + run: echo echo "NODE_VERSION=${{ steps.node-version-file.outputs.node-version }}" >> "${GITHUB_ENV}" + - name: Setup Node.js + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 + with: + node-version: "22" + check-latest: true + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' - name: Check engine - if: steps.npm.outputs.enabled == 'true' + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' run: | if npx -q -y -- check-engine then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["18.x"]')" >> "${GITHUB_ENV}" + echo "NODE_VERSION=$(node --version)" >> "${GITHUB_ENV}" fi - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: 20.x - if: steps.npm.outputs.enabled == 'true' + node-version: "20" + check-latest: true + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' - name: Check engine - if: steps.npm.outputs.enabled == 'true' + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' run: | if npx -q -y -- check-engine then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["20.x"]')" >> "${GITHUB_ENV}" + echo "NODE_VERSION=$(node --version)" >> "${GITHUB_ENV}" fi - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: 22.x - if: steps.npm.outputs.enabled == 'true' + node-version: "18" + check-latest: true + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' - name: Check engine - if: steps.npm.outputs.enabled == 'true' + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' run: | if npx -q -y -- check-engine then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["22.x"]')" >> "${GITHUB_ENV}" + echo "NODE_VERSION=$(node --version)" >> "${GITHUB_ENV}" fi - - name: Set Node.js versions + - name: Fail Node.js version detect + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' + run: | + echo "::error::Failed to detect a supported Node.js version. \ + Please add a `.node-version` file to the root of the project." + exit 1 + - name: Set Node.js version detect if: steps.npm.outputs.enabled == 'true' - id: node_versions + id: node_version run: | - echo "json=[\"20.x\"]" >> "${GITHUB_OUTPUT}" - if [ "${NODE_VERSIONS}" != "[]" ] - then - echo "json=${NODE_VERSIONS}" >> "${GITHUB_OUTPUT}" - fi + echo "string=${NODE_VERSION}" >> "${GITHUB_OUTPUT}" is_docker: name: Is docker runs-on: ${{ fromJSON(inputs.runs_on) }} @@ -1878,7 +1893,8 @@ jobs: fail-fast: false max-parallel: ${{ fromJSON(inputs.max_parallel) }} matrix: - node_version: ${{ fromJSON(needs.is_npm.outputs.node_versions) }} + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} outputs: package: ${{ steps.meta.outputs.package }} version: ${{ steps.meta.outputs.version }} @@ -1913,13 +1929,6 @@ jobs: if: github.event.pull_request.state == 'open' && inputs.disable_versioning != true run: | git update-ref refs/tags/${{ needs.versioned_source.outputs.tag }} ${{ needs.versioned_source.outputs.tag_sha }} - - name: Sort node versions - id: node_versions - env: - VERSIONS: ${{ needs.is_npm.outputs.node_versions }} - run: | - echo "min=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort | head -n1)" >> "${GITHUB_OUTPUT}" - echo "max=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort --reverse | head -n1)" >> "${GITHUB_OUTPUT}" - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: @@ -1975,14 +1984,14 @@ jobs: shell: script -q -e -c "bash --noprofile --norc -eo pipefail -x {0}" /tmp/test-session run: npm test - name: Run pack - if: needs.is_npm.outputs.npm_private != 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_private != 'true' run: | mkdir ${{ runner.temp }}/npm-pack && npm pack --pack-destination=${{ runner.temp }}/npm-pack # FIXME: workaround when `npm pack` for npm 6.x dumps tarball into the current directory because it has no `--pack-destination` flag [[ "$(npm --version)" =~ ^6\..* ]] && find . -maxdepth 1 -name '*.tgz' -exec mv {} ${{ runner.temp }}/npm-pack \; || true - name: Upload artifact - if: needs.is_npm.outputs.npm_private != 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_private != 'true' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} @@ -1993,10 +2002,10 @@ jobs: shell: bash run: npm run doc - name: Compress docs - if: needs.is_npm.outputs.npm_docs == 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_docs == 'true' run: tar --auto-compress -cvf ${{ runner.temp }}/docs.tar.zst ./docs - name: Upload artifact - if: needs.is_npm.outputs.npm_docs == 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_docs == 'true' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: docs-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} @@ -2015,6 +2024,12 @@ jobs: run: working-directory: ${{ inputs.working_directory }} shell: bash --noprofile --norc -eo pipefail -x {0} + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} steps: - name: Generate GitHub App installation token uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a @@ -2046,7 +2061,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: ${{ fromJSON(needs.is_npm.outputs.node_versions)[0] }} + node-version: ${{ matrix.node_version }} - run: npm install - name: Generate SBOM run: | @@ -2094,23 +2109,22 @@ jobs: run: working-directory: . shell: bash --noprofile --norc -eo pipefail -x {0} + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} steps: - - name: Sort node versions - id: node_versions - env: - VERSIONS: ${{ needs.is_npm.outputs.node_versions }} - run: | - echo "min=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort | head -n1)" >> "${GITHUB_OUTPUT}" - echo "max=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort --reverse | head -n1)" >> "${GITHUB_OUTPUT}" - name: Download npm artifact uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: path: ${{ runner.temp }} - name: npm-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: "18" + node-version: ${{ matrix.node_version }} registry-url: ${{ env.NPM_REGISTRY }} - name: Publish draft release env: @@ -2144,6 +2158,12 @@ jobs: run: working-directory: . shell: bash --noprofile --norc -eo pipefail -x {0} + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} steps: - name: Generate GitHub App installation token uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a @@ -2159,13 +2179,6 @@ jobs: "contents": "read", "metadata": "read" } - - name: Sort node versions - id: node_versions - env: - VERSIONS: ${{ needs.is_npm.outputs.node_versions }} - run: | - echo "min=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort | head -n1)" >> "${GITHUB_OUTPUT}" - echo "max=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort --reverse | head -n1)" >> "${GITHUB_OUTPUT}" - name: Download npm artifact from last run uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe with: @@ -2173,11 +2186,11 @@ jobs: commit: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} path: ${{ runner.temp }} workflow_conclusion: success - name: npm-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - name: Setup Node.js uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 with: - node-version: "18" + node-version: ${{ matrix.node_version }} registry-url: ${{ env.NPM_REGISTRY }} - name: Publish final release env: @@ -2199,6 +2212,12 @@ jobs: run: working-directory: . shell: bash --noprofile --norc -eo pipefail -x {0} + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} steps: - name: Generate GitHub App installation token uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a @@ -2215,13 +2234,6 @@ jobs: "contents": "write", "metadata": "read" } - - name: Sort node versions - id: node_versions - env: - VERSIONS: ${{ needs.is_npm.outputs.node_versions }} - run: | - echo "min=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort | head -n1)" >> "${GITHUB_OUTPUT}" - echo "max=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort --reverse | head -n1)" >> "${GITHUB_OUTPUT}" - name: Download npm docs artifact from last run uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe with: @@ -2229,7 +2241,7 @@ jobs: commit: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} path: ${{ runner.temp }} workflow_conclusion: success - name: docs-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: docs-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - name: Extract docs artifact run: | docs="$(ls ${{ runner.temp }}/*.tar.zst | sort -t- -n -k3 | tail -n1)" diff --git a/flowzone.yml b/flowzone.yml index 4b47a558b..083f7e940 100644 --- a/flowzone.yml +++ b/flowzone.yml @@ -633,15 +633,6 @@ with: version: "2.15.43" - - &sortNodeVersions - name: Sort node versions - id: node_versions - env: - VERSIONS: ${{ needs.is_npm.outputs.node_versions }} - run: | - echo "min=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort | head -n1)" >> "${GITHUB_OUTPUT}" - echo "max=$(echo "${VERSIONS}" | jq -r '.[]' | sort --version-sort --reverse | head -n1)" >> "${GITHUB_OUTPUT}" - - &waitForCloudFormation name: Wait for resources run: | @@ -1632,7 +1623,7 @@ jobs: npm_private: ${{ steps.npm.outputs.private }} # can be null or unset npm_docs: ${{ steps.npm.outputs.docs }} # can be null or unset npm_sbom: ${{ inputs.generate_sbom }} # default true - node_versions: ${{ steps.node_versions.outputs.json }} + node_version: ${{ steps.node_version.outputs.string }} npm_access: ${{ steps.access.outputs.access }} steps: @@ -1669,59 +1660,66 @@ jobs: fi echo "access=${access}" >> "${GITHUB_OUTPUT}" - # check which past and current and future Node.js LTS releases meet the engine requirements - # if there are no engine requirements then the current LTS will be used + # Select the latest compatible Node.js LTS release for testing. + # If .node_version is detected in the project, that version will be used. + # Otherwise the check-engine npm package will be used to test + # compatbility with the recent LTS releases in decending order. - <<: *setupNode if: steps.npm.outputs.enabled == 'true' + id: node-version-file + continue-on-error: true with: - node-version: 18.x + # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file + node-version-file: .node-version - - name: Check engine - if: steps.npm.outputs.enabled == 'true' - run: | - if npx -q -y -- check-engine - then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["18.x"]')" >> "${GITHUB_ENV}" - fi + - name: Use ${{ steps.node-version-file.outputs.node-version }} + if: steps.node-version-file.outputs.node-version != '' + run: echo echo "NODE_VERSION=${{ steps.node-version-file.outputs.node-version }}" >> "${GITHUB_ENV}" - - <<: *setupNode - if: steps.npm.outputs.enabled == 'true' + - &setupEngine + <<: *setupNode + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' with: - node-version: 20.x + node-version: '22' + # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#check-latest-version + check-latest: true - - name: Check engine - if: steps.npm.outputs.enabled == 'true' + - &checkEngine + name: Check engine + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' run: | if npx -q -y -- check-engine then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["20.x"]')" >> "${GITHUB_ENV}" + echo "NODE_VERSION=$(node --version)" >> "${GITHUB_ENV}" fi - - <<: *setupNode - if: steps.npm.outputs.enabled == 'true' + - <<: *setupEngine with: - node-version: 22.x + node-version: '20' + # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#check-latest-version + check-latest: true + - *checkEngine - - name: Check engine - if: steps.npm.outputs.enabled == 'true' + - <<: *setupEngine + with: + node-version: '18' + # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#check-latest-version + check-latest: true + - *checkEngine + + - name: Fail Node.js version detect + if: steps.npm.outputs.enabled == 'true' && env.NODE_VERSION == '' run: | - if npx -q -y -- check-engine - then - echo "NODE_VERSIONS=$(echo "${NODE_VERSIONS}" | jq -c '. + ["22.x"]')" >> "${GITHUB_ENV}" - fi + echo "::error::Failed to detect a supported Node.js version. \ + Please add a `.node-version` file to the root of the project." + exit 1 - # default to the current LTS version if none were matched - # by the engine checks above - - name: Set Node.js versions + - name: Set Node.js version detect if: steps.npm.outputs.enabled == 'true' - id: node_versions + id: node_version run: | - echo "json=[\"20.x\"]" >> "${GITHUB_OUTPUT}" - if [ "${NODE_VERSIONS}" != "[]" ] - then - echo "json=${NODE_VERSIONS}" >> "${GITHUB_OUTPUT}" - fi + echo "string=${NODE_VERSION}" >> "${GITHUB_OUTPUT}" # pre-process any docker-compose and docker-bake files is_docker: @@ -2321,11 +2319,14 @@ jobs: <<: *customWorkingDirectory + # Use a matrix strategy with only a single node version + # just so developers can at-a-glance see what node version was used for each job. strategy: fail-fast: false max-parallel: ${{ fromJSON(inputs.max_parallel) }} matrix: - node_version: ${{ fromJSON(needs.is_npm.outputs.node_versions) }} + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} outputs: package: ${{ steps.meta.outputs.package }} @@ -2338,7 +2339,6 @@ jobs: - *getGitHubAppToken - *checkoutVersionedSha - *createLocalRefs - - *sortNodeVersions - <<: *setupNode if: needs.is_npm.outputs.has_npm_lockfile == 'true' @@ -2407,7 +2407,7 @@ jobs: run: npm test - name: Run pack - if: needs.is_npm.outputs.npm_private != 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_private != 'true' run: | mkdir ${{ runner.temp }}/npm-pack && npm pack --pack-destination=${{ runner.temp }}/npm-pack @@ -2415,7 +2415,7 @@ jobs: [[ "$(npm --version)" =~ ^6\..* ]] && find . -maxdepth 1 -name '*.tgz' -exec mv {} ${{ runner.temp }}/npm-pack \; || true - name: Upload artifact - if: needs.is_npm.outputs.npm_private != 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_private != 'true' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} @@ -2428,11 +2428,11 @@ jobs: run: npm run doc - name: Compress docs - if: needs.is_npm.outputs.npm_docs == 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_docs == 'true' run: tar --auto-compress -cvf ${{ runner.temp }}/docs.tar.zst ./docs - name: Upload artifact - if: needs.is_npm.outputs.npm_docs == 'true' && steps.node_versions.outputs.max == matrix.node_version + if: needs.is_npm.outputs.npm_docs == 'true' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: docs-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} @@ -2448,7 +2448,16 @@ jobs: - npm_test - versioned_source if: ${{ needs.is_npm.outputs.npm == 'true' && needs.is_npm.outputs.npm_sbom == 'true' }} + <<: *customWorkingDirectory + + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} + steps: - *getGitHubAppToken - *checkoutVersionedSha @@ -2456,7 +2465,7 @@ jobs: - <<: *setupNode with: - node-version: ${{ fromJSON(needs.is_npm.outputs.node_versions)[0] }} + node-version: ${{ matrix.node_version }} - run: npm install @@ -2497,20 +2506,27 @@ jobs: <<: *rootWorkingDirectory - steps: - - *sortNodeVersions + # Use a matrix strategy with only a single node version + # just so developers can at-a-glance see what node version was used for each job. + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} + steps: - name: Download npm artifact uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: path: ${{ runner.temp }} - name: npm-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - <<: *setupNode with: # use npm v9 or later as the access flag behaviour has changed # https://docs.npmjs.com/cli/v9/commands/npm-publish?access - node-version: "18" + node-version: ${{ matrix.node_version }} registry-url: "${{ env.NPM_REGISTRY }}" # unpack the tarball provided by the tests so we can apply the draft version to package.json @@ -2548,9 +2564,17 @@ jobs: <<: *rootWorkingDirectory + # Use a matrix strategy with only a single node version + # just so developers can at-a-glance see what node version was used for each job. + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} + steps: - *getGitHubAppToken - - *sortNodeVersions # https://github.com/dawidd6/action-download-artifact # TODO: what if this is a tag event and PR artifacts do not exist? @@ -2561,13 +2585,13 @@ jobs: commit: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} path: ${{ runner.temp }} workflow_conclusion: success - name: npm-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: npm-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - <<: *setupNode with: # use npm v9 or later as the access flag behaviour has changed # https://docs.npmjs.com/cli/v9/commands/npm-publish?access - node-version: "18" + node-version: ${{ matrix.node_version }} registry-url: "${{ env.NPM_REGISTRY }}" - name: Publish final release @@ -2591,6 +2615,15 @@ jobs: <<: *rootWorkingDirectory + # Use a matrix strategy with only a single node version + # just so developers can at-a-glance see what node version was used for each job. + strategy: + fail-fast: false + max-parallel: ${{ fromJSON(inputs.max_parallel) }} + matrix: + include: + - node_version: ${{ needs.is_npm.outputs.node_version }} + steps: - <<: *getGitHubAppToken with: @@ -2603,8 +2636,6 @@ jobs: "metadata": "read" } - - *sortNodeVersions - # https://github.com/dawidd6/action-download-artifact # TODO: what if this is a tag event and PR artifacts do not exist? - name: Download npm docs artifact from last run @@ -2614,7 +2645,7 @@ jobs: commit: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} path: ${{ runner.temp }} workflow_conclusion: success - name: docs-${{ github.event.pull_request.head.sha }}-${{ steps.node_versions.outputs.max }} + name: docs-${{ github.event.pull_request.head.sha }}-${{ matrix.node_version }} - name: Extract docs artifact run: | diff --git a/tests/.node-version b/tests/.node-version new file mode 100644 index 000000000..2a393af59 --- /dev/null +++ b/tests/.node-version @@ -0,0 +1 @@ +20.18.0