Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
977c2bf
🧹 remove comments
javikalsan Aug 29, 2025
6571850
🔧 new ci proposal
javikalsan Aug 29, 2025
9bca6e8
🔧 Execute only on push
javikalsan Aug 29, 2025
c2faa4b
🔧 Cover cypress application dependency
javikalsan Aug 29, 2025
3ec920b
🔧 Make available application to host
javikalsan Aug 29, 2025
806afb8
🔧 Fix command
javikalsan Aug 29, 2025
1283231
🔧 Set nuances for github scenario
javikalsan Aug 29, 2025
5589bc2
🔧 Force `chrome` browser
javikalsan Aug 29, 2025
f8d3c56
🔧 Increase cypress default timeouts
javikalsan Aug 29, 2025
3d063af
🔧 Add missing configuration
javikalsan Aug 29, 2025
3385431
🔧 poc without command
javikalsan Aug 29, 2025
cfe5256
🔧 Remove error configuration
javikalsan Aug 29, 2025
92996cb
🔧 Fix option name
javikalsan Aug 29, 2025
d69dc09
🔧 Disable GPU and improvements
javikalsan Aug 29, 2025
58df590
🔧 Fix command to install dependencies
javikalsan Aug 29, 2025
9ac1bb6
🔧 Add build option
javikalsan Aug 29, 2025
d47bda2
🔧 Change headed strategy
javikalsan Aug 29, 2025
5d21ebd
🔧 Ensure project root
javikalsan Aug 29, 2025
8287b61
🔧 Debugging fixtures
javikalsan Aug 29, 2025
dac10f3
🔧 Clear cypress cache
javikalsan Aug 29, 2025
e1cab0f
🔧 Add poc test
javikalsan Aug 29, 2025
8285e4a
🔧 Increase timeouts
javikalsan Aug 29, 2025
6c33587
🔧 Fixture data to stdout
javikalsan Aug 29, 2025
276c740
🚧 tune env vars configuration
javikalsan Sep 8, 2025
cfdf2de
🚧 performance poc
javikalsan Sep 8, 2025
98d7935
🚧 performance poc
javikalsan Sep 8, 2025
2085fd0
🐛 Add missing fixture
javikalsan Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Check for Outdated NPM Dependencies
name: CI - Check for Outdated NPM Dependencies
on: [push]

jobs:
check-outdated:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.11.0'

- name: Install dependencies
run: npm install

- name: Install npm 10.3.0
run: npm install -g npm@10.3.0
- name: Install npm 10.9.3
run: npm install -g npm@10.9.3

# Optional: Clear npm cache to prevent cache-related issues
- name: Clear npm cache
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/ci-cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# .github/workflows/ci-cypress.yml
name: CI - Cypress tests

on:
push:

jobs:
cypress-tests:
runs-on: ubuntu-latest
container:
image: cypress/included:12.17.4
strategy:
matrix:
node-version:
- '20'

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install NPM dependencies
run: npm install

- name: Write holder data fixture
run: |
echo "$CYPRESS_HOLDER_CHANGE_PERSONALDATA_JSON" > cypress/fixtures/holderChangePersonaldata.json
shell: bash
env:
CYPRESS_HOLDER_CHANGE_PERSONALDATA_JSON: ${{ secrets.CYPRESS_HOLDER_CHANGE_PERSONALDATA_JSON }}

- name: Run Cypress tests
uses: cypress-io/github-action@v6
with:
start: npm run start-ci
wait-on: 'http://localhost:3000'
wait-on-timeout: 60
browser: chrome
headed: false
working-directory: ./
config:
baseUrl=http://localhost:3000

env:
PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
VITE_WEBFORMS_API_URL: ${{ secrets.VITE_WEBFORMS_API_URL }}
VITE_PLAUSIBLE_TRACK_DOMAIN: ${{ secrets.VITE_PLAUSIBLE_TRACK_DOMAIN }}
VITE_PLAUSIBLE_APIHOST_URL: ${{ secrets.VITE_PLAUSIBLE_APIHOST_URL }}
VITE_CONTRACT_JSON_DATA: ${{ secrets.VITE_CONTRACT_JSON_DATA }}
VITE_GENERATION_INVESTMENTS_JSON_DATA: ${{ secrets.VITE_GENERATION_INVESTMENTS_JSON_DATA }}
VITE_GENERATION_ASSIGNMENTS_JSON_DATA: ${{ secrets.VITE_GENERATION_ASSIGNMENTS_JSON_DATA }}
VITE_GENERATION_OUTSIDE_ASSIGNMENTS: ${{ secrets.VITE_GENERATION_OUTSIDE_ASSIGNMENTS }}
VITE_FEATURE_FLAGS: ${{ secrets.VITE_FEATURE_FLAGS }}
VITE_SHOW_D1_POWER_MODIFICATION_CHOOSER: ${{ secrets.VITE_SHOW_D1_POWER_MODIFICATION_CHOOSER }}
VITE_GOOGLE_MAPS_JAVASCRIPT_API_KEY: ${{ secrets.VITE_GOOGLE_MAPS_JAVASCRIPT_API_KEY }}
VITE_GENERATE_SOURCEMAP: ${{ secrets.VITE_GENERATE_SOURCEMAP }}
VITE_MATOMO_URL: ${{ secrets.VITE_MATOMO_URL }}
VITE_MATOMO_SITE_ID: ${{ secrets.VITE_MATOMO_SITE_ID }}
REACT_APP_DISABLE_ANIMATIONS: true
CYPRESS_pageLoadTimeout: 6000
ELECTRON_DISABLE_GPU: 1
CHROME_DISABLE_GPU: true

- name: Clean up fixture
if: always()
run: rm -f cypress/fixtures/holderChangePersonaldata.json

- name: Notify
uses: Som-Energia/ghactions-notify@main
if: always()
with:
webhook: ${{ secrets.WEBHOOK_ALERTES_WEBAPPS }}
35 changes: 35 additions & 0 deletions .github/workflows/ci-vitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .github/workflows/ci-vitest.yml
name: CI - Vitest tests

on:
push:

jobs:
vitest-tests:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
strategy:
matrix:
node-version:
- '20'

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install && npm install coveralls --save-dev

- name: Run Vitest tests
run: npm run test-ci

- name: Notify
uses: Som-Energia/ghactions-notify@main
if: always()
with:
webhook: ${{ secrets.WEBHOOK_ALERTES_WEBAPPS }}
31 changes: 0 additions & 31 deletions .github/workflows/cypress.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/main.yml

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
"private": false,
"scripts": {
"start": "export VITE_APP_VERSION=$(git describe --tags) && vite",
"start-ci": "export VITE_APP_VERSION=$(git describe --tags) && vite --host",
"build": "export VITE_APP_VERSION=$(git describe --tags) && vite build",
"build:ov": "npm run build -- --mode=ov && ./scripts/rename-assets-ov.sh",
"build:wp": "npm run build -- --mode=wp",
"build:pre": "npm run build -- --mode=pre",
"build:vercel": "npm run build -- --mode=vercel",
"test": "TZ=Europe/Madrid vitest",
"test-ci": "TZ=Europe/Madrid vitest run",
"test:coverage": "TZ=Europe/Madrid vitest run --coverage",
"cypress": "TZ=Europe/Madrid cypress open",
"cypress-ci": "TZ=Europe/Madrid cypress run --browser chrome --headless",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"i18n-extract": "./node_modules/.bin/i18next src/**/*.js* -o src/i18n/locale-xx.json -s",
"i18n-lint": "./scripts/lint-i18n.sh",
Expand Down
Loading