Skip to content

Commit

Permalink
Upgrade node to 18 (#2533)
Browse files Browse the repository at this point in the history
Co-authored-by: Karolina Rakoczy <karolina.rakoczy@saleor.io>
  • Loading branch information
krzysztofzuraw and karola312 committed Nov 15, 2022
1 parent 8d4cacc commit 5bd79d9
Show file tree
Hide file tree
Showing 19 changed files with 42,231 additions and 295 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-repeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: ".nvmrc"

- name: Install cypress-repeat
run: npm i -D cypress-repeat
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/deploy-and-run-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
env: ${{ env.GITHUB_HEAD_REF_SLUG_URL }}
ref: ${{ github.head_ref }}

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Cache node modules
uses: actions/cache@v2
env:
Expand Down Expand Up @@ -96,9 +101,9 @@ jobs:
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: '.nvmrc'

- name: Cypress run critical
uses: cypress-io/github-action@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-demo-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.git_ref || '' }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy-master-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:
IS_CLOUD_INSTANCE: true
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Package
timeout-minutes: 15
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
environment=$(echo $VERSION | sed -n 's#\([0-9]\+\).\([0-9]\+\).*#saleor-staging-v\1\2#p')
echo "ENVIRONMENT=${environment}" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- name: Package
timeout-minutes: 15
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version-file: '.nvmrc'

- name: Wait for Deploy and tests
uses: lewagon/wait-on-check-action@v1.0.0
Expand All @@ -83,7 +83,7 @@ jobs:
run-tests-in-parallel-on-label:
needs: [get-selected-tags-and-containers, install-cypress]
runs-on: ubuntu-latest
container: cypress/browsers:node14.16.0-chrome89-ff86
container: cypress/browsers:node18.12.0-chrome106-ff106
strategy:
fail-fast: false
max-parallel: 10
Expand Down Expand Up @@ -127,4 +127,4 @@ jobs:
parallel: true
group: 'UI - Chrome'
record: true
tag: e2eTestsOnPR
tag: e2eTestsOnPR
18 changes: 11 additions & 7 deletions .github/workflows/test-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
base_URL: ${{ steps.set-domain.outputs.domain }}
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"

- uses: rlespinasse/github-slug-action@3.1.0

Expand Down Expand Up @@ -165,12 +169,12 @@ jobs:
- name: echo-tags
run: |
echo ${{steps.get_tags.outputs.result}}
echo ${{steps.get_tags.outputs.result}}
cypress-run-selected:
runs-on: ubuntu-latest
needs: [prepare-tests, deploy]
container: cypress/browsers:node14.16.0-chrome89-ff86
container: cypress/browsers:node18.12.0-chrome106-ff106
strategy:
fail-fast: false
max-parallel: 10
Expand All @@ -191,9 +195,9 @@ jobs:
run: |
echo "::set-output name=custom_api_uri::$(echo $pull_request_body | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1 | { read custom_uri; if [ -z "$custom_uri" ]; then echo "$fallback_uri"; else echo "$custom_uri"; fi })"
- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version-file: ".nvmrc"

- name: Cache node modules
uses: actions/cache@v2
Expand All @@ -208,7 +212,7 @@ jobs:
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
run: NODE_OPTIONS=--max_old_space_size=4096 npm install

- name: Cypress run critical
uses: cypress-io/github-action@v4
Expand All @@ -225,6 +229,6 @@ jobs:
CYPRESS_grepTags: ${{ needs.prepare-tests.outputs.tags }}
with:
parallel: true
group: 'UI - Chrome'
group: "UI - Chrome"
record: true
tag: Critical, ${{github.event.action}}
tag: Critical, ${{github.event.action}}
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version-file: '.nvmrc'
- name: Cache node modules
uses: actions/cache@v2
env:
Expand All @@ -75,7 +75,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Cache node modules
uses: actions/cache@v2
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: '.nvmrc'

- name: Install saleor cli
id: install-saleor-cli
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 14
node-version-file: '.nvmrc'

- name: Cypress run
id: cypress
Expand Down Expand Up @@ -161,9 +161,9 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version-file: '.nvmrc'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -253,9 +253,9 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 14
node-version-file: '.nvmrc'

- name: Install dependencies
run: |
Expand Down
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
puppeteer_skip_chromium_download = true
puppeteer_skip_chromium_download=true
legacy-peer-deps=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19.0
18
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14 as builder
FROM node:18 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down
Loading

0 comments on commit 5bd79d9

Please sign in to comment.