ci: move node version into a variable

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2022-03-06 21:05:40 +01:00
parent d73c9b8e86
commit 268b39154d
2 changed files with 17 additions and 10 deletions

View file

@ -10,6 +10,10 @@ on:
pull_request:
branches: [ develop ]
env:
NODEJS_VERSION: 17
jobs:
sqlite: # This run also collects coverage
runs-on: ubuntu-latest
@ -17,10 +21,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 17
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e:cov
@ -46,10 +50,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 17
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e
@ -71,10 +75,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 17
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e

View file

@ -11,6 +11,9 @@ on:
pull_request:
branches: [ develop ]
env:
NODEJS_VERSION: 17
jobs:
lint:
runs-on: ubuntu-latest
@ -21,10 +24,10 @@ jobs:
- yarn run format
steps:
- uses: actions/checkout@v3
- name: Use Node.js 17
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: ${{matrix.command}}
@ -49,10 +52,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 17
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:cov