ci: use .nvmrc everywhere (#11747)

This commit is contained in:
Nikolay Vitkov 2024-01-25 10:20:58 +01:00 committed by GitHub
parent b53de4e094
commit 3a4a23faa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -328,6 +328,8 @@ jobs:
name: Build installation test
runs-on: ubuntu-latest
needs: check-changes
outputs:
node-version: ${{ steps.node-version.outputs.node }}
if: ${{ !startsWith(github.ref_name, 'release-please') && contains(fromJSON(needs.check-changes.outputs.changes), 'puppeteer') }}
steps:
- name: Checkout
@ -337,6 +339,9 @@ jobs:
with:
cache: npm
node-version-file: '.nvmrc'
- name: Config Node.JS for installation test run
id: node-version
run: echo "node=$(cat .nvmrc)" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: npm ci
env:
@ -361,8 +366,6 @@ jobs:
matrix:
linux-only:
- ${{ github.event_name == 'pull_request' && !contains(github.head_ref, 'release-please') && !contains(github.event.pull_request.labels.*.name, 'full-ci') }}
node:
- 18
pkg_manager:
- npm
os:
@ -384,7 +387,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.node }}
node-version-file: ${{ needs.installation-test-build.node-version }}
- name: Install dependencies
run: ${{ matrix.pkg_manager }} install
- name: Test