feat(ci): added node_modules cache in ci.js.yml #7409
Workflow file for this run
This file contains hidden or 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: Cypress tests | |
on: [push] | |
env: | |
FRAMER_WEBSITE_URL: https://reva.incubateur.net | |
REACT_APP_API_GRAPHQL: https://reva.incubateur.net/api/graphql | |
REACT_APP_KEYCLOAK_REALM: reva-app | |
REACT_APP_KEYCLOAK_URL: https://auth.reva.incubateur.net/ | |
REACT_APP_KEYCLOAK_CLIENT_ID: reva-app | |
# On la definie uniquement pour que le serveur start... | |
DATABASE_URL: postgresql://reva:password@localhost:5444/reva?schema=public | |
NEXT_PUBLIC_WEBSITE_API_GRAPHQL: https://reva.incubateur.net/api/graphql | |
NEXT_PUBLIC_FEATURE_CANDIDATE_ORIENTATION: true | |
NEXT_PUBLIC_WEBSITE_STRAPI_BASE_URL: "https://strapi.vae.gouv.fr" | |
NEXT_PUBLIC_KEYCLOAK_REALM: reva | |
NEXT_PUBLIC_KEYCLOAK_URL: https://auth.reva.incubateur.net/ | |
NEXT_PUBLIC_KEYCLOAK_CLIENT_ID: reva-admin | |
NEXT_PUBLIC_APP_CANDIDAT_KEYCLOAK_CLIENT_ID: reva-app | |
NEXT_PUBLIC_APP_CANDIDAT_KEYCLOAK_REALM: reva-app | |
NEXT_PUBLIC_APP_CANDIDAT_KEYCLOAK_URL: https://auth.reva.incubateur.net | |
jobs: | |
cypress-run-reva-admin: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./packages/reva-admin-react | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22.x | |
cache: "npm" | |
- name: Admin node_modules cache | |
id: admin-node_modules-cache | |
uses: actions/cache@v4 | |
with: | |
path: ./packages/reva-admin-react/node_modules | |
key: node_modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing dependencies | |
if: steps.admin-node_modules-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Running Test | |
run: NODE_ENV=production npm run test:ci | |
cypress-run-reva-candidate: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./packages/reva-candidate | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22.x | |
cache: "npm" | |
- name: Candidate node_modules cache | |
id: candidate-node_modules-cache | |
uses: actions/cache@v4 | |
with: | |
path: ./packages/reva-candidate/node_modules | |
key: node_modules-${{ hashFiles('**/package-lock.json') }} | |
- name: Installing dependencies | |
if: steps.candidate-node_modules-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Running Test | |
run: NODE_ENV=production npm run test:ci |