Chore - Next.JS upgrade #2500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Entourage Pro [front-end] | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: {} | |
workflow_dispatch: | |
env: | |
WEBINAR_URL: 'https://google.com' | |
TOOLBOX_COACH_URL: 'https://google.com' | |
TOOLBOX_CANDIDATE_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' | |
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' | |
HEROKU_RELEASE_VERSION: 'v100' | |
NEXT_TELEMETRY_DISABLED: 1 | |
jobs: | |
test: | |
name: E2E on Chrome | |
runs-on: ubuntu-latest # use ubuntu-latest | |
environment: 'entourage-job-front' | |
container: | |
image: cypress/browsers:node18.12.0-chrome107 # use node18.12.0-chrome107 image from cypress/browsers (dockerhub) | |
options: --user 1001 # to grant user permission | |
steps: | |
# Move on the ref | |
- name: Checkout on PR | |
uses: actions/checkout@v4 # action to checkout on the ref | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
# Get node module from cache | |
# - name: Cache Node Modules | |
# id: pnpm-cache-deps | |
# uses: actions/cache@v3 # action to cache node modules | |
# with: | |
# # pnpm cache files are stored in `/node_modules` on Linux/macOS | |
# path: '**/node_modules' | |
# key: linux-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# linux-node-modules- | |
# linux-node- | |
- name: Install dependencies | |
run: pnpm install | |
# if: steps.pnpm-cache-deps.outputs.cache-hit != 'true' | |
# Run ts-check test then eslint test | |
- name: Run ts-check & eslint - Code Quality Test | |
run: | | |
pnpm run test:ts-check | |
pnpm run test:eslint | |
# Run jest test | |
- name: Run Jest - Integration Test | |
run: pnpm run test:integ | |
# Run cypress test | |
- name: Run Cypress - End to End Test | |
uses: cypress-io/github-action@v4 # action to exec cypress-io | |
with: | |
start: pnpm run dev # run dev script to enable cypress execution | |
config: e2e.baseUrl=http://localhost:3000 | |
browser: chrome | |
command: pnpm dlx cypress run --key ${{ secrets.CYPRESS_IO_KEY }} --record | |
wait-on: http://localhost:3000 |