diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml index cfad1a9c88ed..56b8faf66053 100644 --- a/.github/actions/prepare/action.yml +++ b/.github/actions/prepare/action.yml @@ -6,7 +6,7 @@ inputs: node-version: description: 'The version of Node.js to use' required: false - default: '22' + default: 'current' runs: using: composite diff --git a/.github/workflows/integration-workflow.yml b/.github/workflows/integration-workflow.yml index 27ad75825cf1..44ecd2ad0bb1 100644 --- a/.github/workflows/integration-workflow.yml +++ b/.github/workflows/integration-workflow.yml @@ -209,12 +209,28 @@ jobs: name: vscode-zipfs path: ./packages/vscode-zipfs/vscode-zipfs-*.vsix + node-versions: + name: 'Acceptance test node versions' + outputs: + versions: ${{ steps.versions.outputs.versions }} + runs-on: ubuntu-latest + steps: + - id: versions + shell: bash + run: > + echo -n 'versions=' + >> $GITHUB_OUTPUT + + curl https://nodejs.org/dist/index.json | + jq -c '[.[0:1] + map(select(.lts)) | .[].version | capture("^v(?\\d+)") | .major | tonumber] | unique | map(select(. >= 18))' + >> $GITHUB_OUTPUT + acceptance: strategy: fail-fast: false matrix: # We run the ubuntu tests on multiple Node versions with 2 shards since they're the fastest. - node: [18, 19, 20, 21, 22] + node: ${{ fromJson(needs.node-versions.outputs.versions) }} platform: [[ubuntu, 22.04]] shard: ['1/2', '2/2'] include: @@ -239,7 +255,7 @@ jobs: name: '${{matrix.platform[0]}}-latest w/ Node.js ${{matrix.node}}.x (${{matrix.shard}})' runs-on: ${{matrix.platform[0]}}-${{matrix.platform[1]}} - needs: build + needs: [build, node-versions] # Permission required to produce a valid provenance statement during the tests # Only run inside the main repository; this may fail in master since it doesn't run in PRs from forks @@ -249,10 +265,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: 'Use Node.js ${{matrix.node}}.x' + - name: 'Use Node.js ${{matrix.node}}' uses: actions/setup-node@v4 with: - node-version: ${{matrix.node}}.x + node-version: ${{matrix.node}} - uses: actions/download-artifact@v4 with: