Use node and npm versions from package.json in workflows
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Родитель
ef2ae25888
Коммит
aac18601a7
|
@ -56,10 +56,18 @@ jobs:
|
|||
name: ESLint
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@v1.1
|
||||
id: versions
|
||||
with:
|
||||
node-version: 14.x
|
||||
fallbackNode: '^14'
|
||||
fallbackNpm: '^7'
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
- name: npm install
|
||||
run: npm ci
|
||||
- name: eslint
|
||||
|
|
|
@ -17,12 +17,18 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@v1.1
|
||||
id: versions
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: Set up npm
|
||||
run: npm install -g npm@7
|
||||
fallbackNode: '^14'
|
||||
fallbackNpm: '^7'
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
- name: Set up php$
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
|
|
|
@ -196,10 +196,18 @@ jobs:
|
|||
name: Front-end unit tests
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
- name: Read package.json node and npm engines version
|
||||
uses: skjnldsv/read-package-engines-version-actions@v1.1
|
||||
id: versions
|
||||
with:
|
||||
node-version: 14.x
|
||||
fallbackNode: '^14'
|
||||
fallbackNpm: '^7'
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
|
||||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- name: run tests
|
||||
|
|
Загрузка…
Ссылка в новой задаче