From 268b39154dcf1c87213aacf74cc621a642c6185d Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 6 Mar 2022 21:05:40 +0100 Subject: [PATCH] ci: move node version into a variable Signed-off-by: David Mehren --- .github/workflows/e2e-tests.yml | 16 ++++++++++------ .github/workflows/nest.js.yml | 11 +++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index ab4cb9385..db27d792d 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -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 diff --git a/.github/workflows/nest.js.yml b/.github/workflows/nest.js.yml index e72e3bd23..25f0d2fb5 100644 --- a/.github/workflows/nest.js.yml +++ b/.github/workflows/nest.js.yml @@ -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