Skip to content

Commit

Permalink
Revert "Revert "chore: Vite upgrade (#1381)" (#1383)"
Browse files Browse the repository at this point in the history
This reverts commit 1135329.
  • Loading branch information
AtofStryker committed Sep 2, 2023
1 parent 79afc2c commit c14e4a3
Show file tree
Hide file tree
Showing 48 changed files with 5,041 additions and 7,861 deletions.
61 changes: 33 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
executors:
with-chrome-and-firefox:
docker:
- image: "cypress/browsers:node16.16.0-chrome105-ff104-edge"
- image: "cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1"
resource_class: large
environment:
PERCY_TOKEN:
Expand All @@ -28,28 +28,32 @@ commands:
steps:
- persist_to_workspace:
paths:
# for linux builds
- .cache/Cypress
# for windows builds
- AppData/Local/Cypress/Cache
- project
# for linux builds
- .cache/Cypress
# for windows builds
- AppData/Local/Cypress/Cache
- project
root: ~/
attach_ws:
steps:
- attach_workspace:
at: ~/

setup_linux:
steps:
- run:
name: Install curl
command: apt-get update && apt-get install -y curl
# Setup Windows
# 1. Add nvm and install node 16.16.0
# 1. Add nvm and install node 18.16.0
# 2. Install yarn
setup_node_and_yarn_windows:
steps:
- run:
name: Install node 16
command: nvm install 16.16.0
name: Install node 18
command: nvm install 18.16.0
- run:
name: Use node 16
command: nvm use 16.16.0
name: Use node 18
command: nvm use 18.16.0
- run:
name: Install yarn
command: npm i --location=global yarn
Expand Down Expand Up @@ -87,7 +91,7 @@ commands:
default: chrome
specPattern:
type: string
default: ''
default: ""
ciBuildId:
type: string
group:
Expand All @@ -103,23 +107,23 @@ commands:
- when:
condition:
and:
- equal: [ true, << parameters.isComponent >>]
- equal: [true, << parameters.isComponent >>]
steps:
- cypress/run-tests:
cypress-command: yarn cypress run --ci-build-id=<<parameters.ciBuildId>> --group="<<parameters.group>>" --record --parallel --component
- when:
condition:
and:
- equal: [ true, << parameters.isMobile >>]
- equal: [true, << parameters.isMobile >>]
steps:
- cypress/run-tests:
start-command: yarn start:ci
cypress-command: yarn cypress run --ci-build-id=<<parameters.ciBuildId>> --group="<<parameters.group>>" --record --parallel --spec=<<parameters.specPattern>> --browser=<<parameters.browser>> --config viewportWidth=375,viewportHeight=667
- when:
condition:
and:
- equal: [ false, << parameters.isMobile >>]
- equal: [ false, << parameters.isComponent >>]
- equal: [false, << parameters.isMobile >>]
- equal: [false, << parameters.isComponent >>]
steps:
- cypress/run-tests:
start-command: yarn start:ci
Expand All @@ -130,7 +134,7 @@ commands:
jobs:
setup_project_and_cypress_linux:
executor: with-chrome-and-firefox
steps:
steps:
- setup_project_and_cypress
setup_project_and_cypress_windows:
executor:
Expand All @@ -154,7 +158,7 @@ jobs:
default: chrome
specPattern:
type: string
default: ''
default: ""
ciBuildId:
type: string
group:
Expand All @@ -165,14 +169,15 @@ jobs:
isComponent:
type: boolean
default: false
steps:
steps:
- setup_linux
- cypress_tests:
browser: <<parameters.browser>>
specPattern: <<parameters.specPattern>>
ciBuildId: <<parameters.ciBuildId>>
group: <<parameters.group>>
specPattern: <<parameters.specPattern>>
ciBuildId: <<parameters.ciBuildId>>
group: <<parameters.group>>
isMobile: <<parameters.isMobile>>
isComponent: <<parameters.isComponent>>
isComponent: <<parameters.isComponent>>
cypress_tests_windows:
executor:
# executor comes from the "windows" orb
Expand All @@ -185,7 +190,7 @@ jobs:
default: chrome
specPattern:
type: string
default: ''
default: ""
ciBuildId:
type: string
group:
Expand All @@ -200,9 +205,9 @@ jobs:
- setup_node_and_yarn_windows
- cypress_tests:
browser: <<parameters.browser>>
specPattern: <<parameters.specPattern>>
ciBuildId: <<parameters.ciBuildId>>
group: <<parameters.group>>
specPattern: <<parameters.specPattern>>
ciBuildId: <<parameters.ciBuildId>>
group: <<parameters.group>>
isMobile: <<parameters.isMobile>>
isComponent: <<parameters.isComponent>>

Expand Down
20 changes: 10 additions & 10 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ PAGINATION_PAGE_SIZE=10

# Ports used by React (frontend) and Express (backend)
PORT=3000
REACT_APP_BACKEND_PORT=3001
VITE_BACKEND_PORT=3001

# Uncomment when testing with any of the Auth providers below
#REACT_APP_AUTH_TOKEN_NAME="authAccessToken"
#VITE_AUTH_TOKEN_NAME="authAccessToken"

# Auth0 Configuration to be added to .env when running "yarn dev:auth0"
#AUTH0_USERNAME="username@domain.com"
#AUTH0_PASSWORD="s3cret1234$"
#REACT_APP_AUTH0_DOMAIN="your-auth0-domain.auth0.com"
#REACT_APP_AUTH0_CLIENTID="1234567890"
#REACT_APP_AUTH0_AUDIENCE="https://your-auth0-domain.auth0.com/api/v2/"
#REACT_APP_AUTH0_SCOPE="openid email profile"
#VITE_AUTH0_DOMAIN="your-auth0-domain.auth0.com"
#VITE_AUTH0_CLIENTID="1234567890"
#VITE_AUTH0_AUDIENCE="https://your-auth0-domain.auth0.com/api/v2/"
#VITE_AUTH0_SCOPE="openid email profile"

# Okta Configuration to be added to .env when running "yarn dev:okta"
#OKTA_USERNAME="username@domain.com"
#OKTA_PASSWORD="s3cret1234$"
#REACT_APP_OKTA_DOMAIN="dev-your-domain-id.okta.com"
#REACT_APP_OKTA_CLIENTID="your-client-id"
#VITE_OKTA_DOMAIN="dev-your-domain-id.okta.com"
#VITE_OKTA_CLIENTID="your-client-id"

# AWS Cognito #Okta Configuration to be added to .env when running "yarn dev:cognito"
# Additional config taken from aws-exports.js
Expand All @@ -39,6 +39,6 @@ REACT_APP_BACKEND_PORT=3001

# Google Auth Configuration to be added to .env when running "yarn dev:google"
# client ID should look something like <identifier>.apps.googleusercontent.com
# REACT_APP_GOOGLE_CLIENTID="your-client-id"
# REACT_APP_GOOGLE_CLIENT_SECRET="your-client-secret"
# VITE_GOOGLE_CLIENTID="your-client-id"
# VITE_GOOGLE_CLIENT_SECRET="your-client-secret"
# GOOGLE_REFRESH_TOKEN="your-refresh-token"
28 changes: 12 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
install:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
steps:
- name: Checkout
Expand Down Expand Up @@ -42,11 +42,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
# The default install for the job is node 18+
# which has some compatibility issues with openSSL inside this windows job.
# Node 18 updated with OpenSSL provider which causes this compatibility issue
# downgrading node to v16 to use the openssl-legacy-provider by default to prevent this issue
node-version: '16.16.0'
node-version: "18.16.0"

- name: Cypress install
uses: cypress-io/github-action@v5
Expand All @@ -71,7 +67,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
Expand Down Expand Up @@ -113,7 +109,7 @@ jobs:
parallel: true
group: "UI - Chrome"
spec: cypress/tests/ui/*
config-file: cypress.config.js
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand All @@ -126,7 +122,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
Expand Down Expand Up @@ -160,7 +156,7 @@ jobs:
parallel: true
group: "UI - Chrome - Mobile"
spec: cypress/tests/ui/*
config-file: cypress.config.js
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand All @@ -172,7 +168,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
Expand Down Expand Up @@ -205,7 +201,7 @@ jobs:
parallel: true
group: "UI - Firefox"
spec: cypress/tests/ui/*
config-file: cypress.config.js
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand All @@ -217,7 +213,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome105-ff104-edge
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
Expand Down Expand Up @@ -251,7 +247,7 @@ jobs:
parallel: true
group: "UI - Firefox - Mobile"
spec: cypress/tests/ui/*
config-file: cypress.config.js
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand All @@ -277,7 +273,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
node-version: "18.16.0"

- name: Download the build folders
uses: actions/download-artifact@v3
Expand All @@ -295,7 +291,7 @@ jobs:
parallel: true
group: "UI - Electron - Windows"
spec: cypress/tests/ui/*
config-file: cypress.config.js
config-file: cypress.config.ts
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.16.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.16.1
Loading

0 comments on commit c14e4a3

Please sign in to comment.