Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1fe529a
Fixed build workflow
hugo-fdez May 6, 2025
14b01e9
Merge branch 'master' of https://github.com/Arquisoft/wichat_es2a int…
DavidCG-27 May 6, 2025
85545d9
Merge branch 'Corrections' into Fix-Deployment
hugo-fdez May 6, 2025
0172906
Fixed mathgame
hugo-fdez May 7, 2025
b29a3d6
Merge remote-tracking branch 'origin/master' into Fix-Deployment
hugo-fdez May 7, 2025
9f0eb6f
Remove warnings in global ranking
softwaremarcos May 7, 2025
8c60da8
Remove warnings in score
softwaremarcos May 7, 2025
36a91e7
Remove warnings group chat
softwaremarcos May 7, 2025
b75c58d
Remove warnings login
softwaremarcos May 7, 2025
0671551
Fix warnings
NataliaBlancoAgudin May 7, 2025
8434f22
Remove warnings in profile
softwaremarcos May 7, 2025
62a83c4
Remove warnings in user groups
softwaremarcos May 7, 2025
34e3558
Fix warnings (friendlist)
NataliaBlancoAgudin May 7, 2025
e53d4cb
Remove warnings in private chat
softwaremarcos May 7, 2025
5131339
Fix warning (game panel)
NataliaBlancoAgudin May 7, 2025
388aa7c
Merge branch 'Corrections' into Fix-Deployment
NataliaBlancoAgudin May 7, 2025
dd5ac0e
Fix warnings (frindlist)
NataliaBlancoAgudin May 7, 2025
c2bfe8d
Fix errors (login, profile)
NataliaBlancoAgudin May 7, 2025
776c059
Change username and password for tests e2e
softwaremarcos May 7, 2025
092e778
Merge branch 'master' into Fix-Deployment
softwaremarcos May 7, 2025
978ee9f
Try to fix bug
softwaremarcos May 7, 2025
34a1c1f
Try to fix bug in tests
softwaremarcos May 7, 2025
13f297c
Fig some bugs
NataliaBlancoAgudin May 7, 2025
0984a8b
Fix other bugs...
NataliaBlancoAgudin May 7, 2025
8c860f8
Fix others...
NataliaBlancoAgudin May 7, 2025
a49f9de
Increment timeout button
softwaremarcos May 7, 2025
89511c1
Fix other bugs
softwaremarcos May 7, 2025
c27bd95
Try more timeout
softwaremarcos May 7, 2025
b1faccb
Other changes in e2e tests
softwaremarcos May 7, 2025
d677246
Other tests
softwaremarcos May 7, 2025
6847d7c
Modified timeouts
softwaremarcos May 7, 2025
13aeaaa
Add more timeout
softwaremarcos May 7, 2025
5f54292
Fixed? I hope it is.
NataliaBlancoAgudin May 7, 2025
e625fe9
Try changes
softwaremarcos May 7, 2025
96ba2ad
Fix?
NataliaBlancoAgudin May 7, 2025
f2c0020
Merge branch 'Fix-Deployment' of https://github.com/Arquisoft/wichat_…
NataliaBlancoAgudin May 7, 2025
2c90381
last attempt...
NataliaBlancoAgudin May 7, 2025
113ee7c
Other changes
softwaremarcos May 7, 2025
e8e2f8a
Modified tests
softwaremarcos May 7, 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
38 changes: 29 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,34 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
EMPATHY_API_KEY: ${{ secrets.EMPATHY_API_KEY }}

e2e-tests:
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm --prefix users/authservice install
- run: npm --prefix users/userservice install
- run: npm --prefix users/groupservice install
- run: npm --prefix llmservice install
- run: npm --prefix mathGame install
- run: npm --prefix apiservice install
- run: npm --prefix gatewayservice install
- run: npm --prefix webapp install
- run: npm --prefix wikidata install
- run: npm --prefix webapp run build
- run: npm --prefix webapp run test:e2e

docker-push-webapp:
name: Push webapp Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -91,7 +111,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -114,7 +134,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -137,7 +157,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -160,7 +180,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -187,7 +207,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -210,7 +230,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -233,7 +253,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand All @@ -256,7 +276,7 @@ jobs:
permissions:
contents: read
packages: write
needs: []
needs: [e2e-tests]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ services:
- "27017:27017"
networks:
- mynetwork

mathgame:
container_name: mathgame-wichat_es2a
image: ghcr.io/arquisoft/wichat_es2a/mathgame:latest
Expand All @@ -26,6 +25,7 @@ services:
environment:
DEPLOY_HOST: ${DEPLOY_HOST:-localhost}
WEBAPP_PORT: ${WEBAPP_PORT:-3000}
MATHGAME_PORT: 3002
restart: always

authservice:
Expand Down
22 changes: 22 additions & 0 deletions mathGame/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const express = require('express');
const cors = require('cors');
const mathGameRoutes = require('./mathGameRoutes');

// Crear la aplicación Express
const app = express();

// Middleware
app.use(cors());
app.use(express.json());
app.disable('x-powered-by'); // Para mayor seguridad

// Usar las rutas del mathGame
app.use('/mathgame', mathGameRoutes);

// Ruta de salud para verificar que el servicio esté funcionando
app.get('/health', (req, res) => {
res.status(200).json({ status: 'OK', message: 'MathGame service is running' });
});

// Exportamos la aplicación Express
module.exports = app;
12 changes: 6 additions & 6 deletions mathGame/mathGameRoutes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const express = require('express');
const app = express();
app.disable('x-powered-by');
const router = express.Router();
const service = require('./service/mathGameService');

app.use(express.json());
// Configuración básica
router.use(express.json());



Expand All @@ -23,7 +23,7 @@ app.use(express.json());
* correct: 90
* }
*/
app.get('/mathgame/question', (req, res) => {
router.get('/question', (req, res) => {
try {
const raw = req.query.base;
const base = raw != null && !Number.isNaN(parseInt(raw, 10))
Expand Down Expand Up @@ -55,7 +55,7 @@ app.get('/mathgame/question', (req, res) => {
* isCorrect: boolean
* }
*/
app.post('/mathgame/verify', (req, res) => {
router.post('/verify', (req, res) => {
try {
const { choice, correct } = req.body;
const isCorrect = Number(choice) === Number(correct);
Expand All @@ -66,4 +66,4 @@ app.post('/mathgame/verify', (req, res) => {
}
});

module.exports = app;
module.exports = router;
8 changes: 6 additions & 2 deletions mathGame/mathGameRoutes.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const request = require('supertest');
const app = require('./mathGameRoutes');
const service = require('./service/mathGameService');
const express = require('express');
const router = require('./mathGameRoutes');
const service = require('./service/mathGameService');

// Crear una aplicación Express para los tests
const app = express();
app.use('/mathgame', router);

jest.mock('./service/mathGameService');

Expand Down
23 changes: 23 additions & 0 deletions mathGame/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mathGame/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"supertest": "^7.0.0"
},
"dependencies": {
"cors": "^2.8.5",
"express": "^5.1.0",
"mathgame": "file:"
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
testMatch: ["**/steps/*.js"],
testTimeout: 120000,
testTimeout: 1000000,
setupFilesAfterEnv: ["expect-puppeteer"]
}
Loading
Loading