From 25321a32907254537192888b85de96d5e0915186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 16 Dec 2021 09:29:55 +0100 Subject: [PATCH] Add engines support for cypress tests --- .github/workflows/cypress.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index d1e9e8c78..eff2dcef4 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -34,13 +34,20 @@ jobs: cd cypress docker-compose up -d - - name: Set up node + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.1 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} uses: actions/setup-node@v2 with: - node-version: 14 + node-version: ${{ steps.versions.outputs.nodeVersion }} - - name: Set up npm7 - run: npm i -g npm@7 + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies & build app run: |