Skip to content

Commit

Permalink
Merge branch 'release/v12.14.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
emile-bex committed Feb 26, 2024
2 parents 9717577 + f3f1827 commit b29e1cc
Show file tree
Hide file tree
Showing 200 changed files with 5,411 additions and 5,275 deletions.
86 changes: 67 additions & 19 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"plugin:@next/next/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended" // should always be the last element in the array
"plugin:prettier/recommended"
// should always be the last element in the array
],
"env": {
"browser": true,
Expand All @@ -35,9 +36,22 @@
"rules": {
// Plain JavaScript Rules
"arrow-body-style": 0,

"no-console": [1, { "allow": ["warn", "error"] }],
"no-multiple-empty-lines": [2, { "max": 1 }], // prettier like
"no-console": [
1,
{
"allow": [
"warn",
"error"
]
}
],
"no-multiple-empty-lines": [
2,
{
"max": 1
}
],
// prettier like
// max-len is enought
"object-curly-newline": 0,
// disable due to TypeScript params. More infos here: https://kendaleiv.com/typescript-constructor-assignment-public-and-private-keywords
Expand All @@ -46,7 +60,10 @@
"max-classes-per-file": 0,
"camelcase": "off",
"curly": "warn",
"strict": ["error", "global"],
"strict": [
"error",
"global"
],
"prefer-promise-reject-errors": "off",
"no-return-assign": "off",
"no-case-declarations": "off",
Expand All @@ -68,23 +85,31 @@
"react/forbid-prop-types": "warn",
"react/jsx-props-no-spreading": "off",
"react/jsx-wrap-multilines": "off",

// with TypeScript, no default props
"react/require-default-props": 0,
"react/static-property-placement": ["warn", "static getter"],
"react/static-property-placement": [
"warn",
"static getter"
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"jsx-a11y/aria-role": [
2,
{
"allowedInvalidRoles": ["Candidat"],
"allowedInvalidRoles": [
"Candidat"
],
"ignoreNonDOM": true
}
],
"react/jsx-filename-extension": [
"warn",
{
"extensions": [".js", ".jsx", ".tsx"]
"extensions": [
".js",
".jsx",
".tsx"
]
}
],
"prettier/prettier": [
Expand All @@ -94,9 +119,14 @@
"usePrettierrc": true
}
],

// TypeScript Rules
"@typescript-eslint/no-unused-vars": [1, { "ignoreRestSiblings": true }],
"@typescript-eslint/no-unused-vars": [
1,
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^(_action|_state)"
}
],
"@typescript-eslint/member-delimiter-style": [
1,
{
Expand All @@ -117,13 +147,17 @@
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/interface-name-prefix": 0,

// Import Rules
// TODO put ts: never and tsx: never when all files have been transformed
"import/extensions": [
2,
"ignorePackages",
{ "ts": "never", "tsx": "never", "js": "never", "jsx": "never" }
{
"ts": "never",
"tsx": "never",
"js": "never",
"jsx": "never"
}
],
"import/prefer-default-export": 0,
"import/no-default-export": 2,
Expand Down Expand Up @@ -173,14 +207,19 @@
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
},
"node": {
"paths": ["."]
"paths": [
"."
]
}
}
},
Expand All @@ -192,21 +231,30 @@
"overrides": [
{
// storybook use both default export and named exports
"files": ["src/**/*.stories.tsx", "./.storybook/**/*"],
"files": [
"src/**/*.stories.tsx",
"./.storybook/**/*"
],
"rules": {
"import/no-default-export": 0
}
},
{
"files": ["src/pages/**"],
"files": [
"src/pages/**"
],
"rules": {
"import/no-default-export": 0,
"import/prefer-default-export": 2
}
},
{
"files": ["./**/*.ts"],
"excludedFiles": ["./**/*.spec.ts"],
"files": [
"./**/*.ts"
],
"excludedFiles": [
"./**/*.spec.ts"
],
"rules": {
"@jambit/typed-redux-saga/use-typed-effects": "error",
"@jambit/typed-redux-saga/delegate-effects": "error"
Expand Down
94 changes: 56 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,80 @@
name: LinkedOut Frontend Test
name: LinkedOut [front-end]

on:
[push]
# pull_request:
# branches: [master, develop]
# workflow_dispatch:
pull_request: {} # events by default (open, synchronized, reopened) in any branch triggers the workflow.

env:
WEBINAR_URL: https://google.com
TOOLBOX_URL: https://google.com
TUTORIAL_CV: https://google.com
TUTORIAL_PP: https://google.com
TUTORIAL_VIDEO_FIRST_STEPS: https://google.com
TUTORIAL_VIDEO_CV: https://google.com
TUTORIAL_VIDEO_OFFERS: https://google.com
TUTORIAL_VIDEO_OFFERS_2: https://google.com
TUTORIAL_INTERVIEW_TRAINING: https://google.com
IRAISER_DONATION_LINK: https://google.com
SERVER_URL: http://localhost:3000
API_URL: http://localhost:3002
WEBINAR_URL: 'https://google.com'
TOOLBOX_URL: 'https://google.com'
TUTORIAL_CV: 'https://google.com'
TUTORIAL_PP: 'https://google.com'
TUTORIAL_VIDEO_FIRST_STEPS: 'https://google.com'
TUTORIAL_VIDEO_CV: 'https://google.com'
TUTORIAL_VIDEO_OFFERS: 'https://google.com'
TUTORIAL_VIDEO_OFFERS_2: 'https://google.com'
TUTORIAL_INTERVIEW_TRAINING: 'https://google.com'
IRAISER_DONATION_LINK: 'https://google.com'
SERVER_URL: 'http://localhost:3000'
API_URL: 'http://localhost:3002'
PORT: 3000
AWSS3_URL: https://entourage-job-preprod.s3.amazonaws.com
AWSS3_CDN_URL: https://d3s4t580ymtqme.cloudfront.net
CDN_URL: https://d280vsj7wg1qqw.cloudfront.net
AWSS3_IMAGE_DIRECTORY: /images/
CYPRESS_IO_PROJECT_ID: ${{ secrets.CYPRESS_IO_PROJECT_ID }}
PUSHER_API_KEY: ${{ secrets.PUSHER_API_KEY }}
ADRESSE_LOCAUX_PARIS: "174 Rue Championnet 75018, Paris"
ADRESSE_LOCAUX_PARIS: '174 Rue Championnet 75018, Paris'
HEROKU_RELEASE_VERSION: 'v100'
NEXT_TELEMETRY_DISABLED: 1

jobs:
test:
runs-on: ubuntu-latest
name: E2E on Chrome
runs-on: ubuntu-latest # use ubuntu-latest
environment: 'entourage-job-front'
container:
image: cypress/browsers:node16.17.0-chrome106
options: --user 1001
image: cypress/browsers:node16.17.0-chrome106 # use node16.17.0-chrome106 image from cypress/browsers (dockerhub)
options: --user 1001 # to grant user permission
steps:
- name: checkout
uses: actions/checkout@v3
# Move on the ref
- name: Checkout on PR
uses: actions/checkout@v3 # action to checkout on the ref

- name: cypress
uses: cypress-io/github-action@v4
# Get node module from cache
- name: Cache Node Modules
id: yarn-cache-deps
uses: actions/cache@v3 # action to cache node modules
with:
start: yarn dev
config: e2e.baseUrl=http://localhost:3000
browser: chrome
command: npx cypress run --record --key ${{ secrets.CYPRESS_IO_KEY }}
wait-on: http://localhost:3000
# npm cache files are stored in `/node_modules` on Linux/macOS
path: '**/node_modules'
key: linux-node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
linux-node-modules-
linux-node-
- run: yarn test:ts-check
# Run `yarn install` if cache no exist
- name: Yarn Install Deps
continue-on-error: true
run: |
yarn install --frozen-lockfile
if: steps.yarn-cache-deps.outputs.cache-hit != 'true'

- run: yarn test:eslint
# Run ts-check test then eslint test
- name: Run ts-check & eslint - Code Quality Test
run: |
yarn test:ts-check
yarn test:eslint
- name: set-up
uses: actions/setup-node@v3
with:
node-version: '16.x'
# Run jest test
- name: Run Jest - Integration Test
run: yarn test:integ

- run: yarn test:inte
- run: echo No tests
# Run cypress test
- name: Run Cypress - End to End Test
uses: cypress-io/github-action@v4 # action to exec cypress-io
with:
start: yarn dev # run dev script to enable cypress execution
config: e2e.baseUrl=http://localhost:3000
browser: chrome
command: npx cypress run --key ${{ secrets.CYPRESS_IO_KEY }}
wait-on: http://localhost:3000
10 changes: 5 additions & 5 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: 'Storybook deploy'

# Event for the workflow
on:
on:
push:
branches:
branches:
- develop

# List of jobs
Expand All @@ -14,11 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
with:
node-version: 16
- name: Install dependencies
run: yarn
- name: Publish to Chromatic
uses: chromaui/action@v1
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ coverage/
/cypress/support
/cypress/videos
/tsconfig.tsbuildinfo
/storybook-static
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test:inte
yarn test:integ
Loading

0 comments on commit b29e1cc

Please sign in to comment.