Skip to content

Commit

Permalink
Merge branch 'master' into Marina
Browse files Browse the repository at this point in the history
  • Loading branch information
UO288559 authored Apr 22, 2024
2 parents a06277d + 70a66c6 commit 1d37540
Show file tree
Hide file tree
Showing 40 changed files with 647 additions and 187 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- run: npm --prefix webapp ci
- run: npm --prefix questiongenerator ci
- run: npm --prefix gamehistoryservice ci
- run: npm --prefix apis/allquestionservice ci
- run: npm --prefix apis/alluserservice ci
- run: npm --prefix perfilservice ci
- run: npm --prefix users/authservice test -- --coverage
- run: npm --prefix users/userservice test -- --coverage
- run: npm --prefix gatewayservice test -- --coverage
Expand Down
54 changes: 53 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,62 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gamehistoryservice
docker-push-perfilservice:
name: Push perfil service service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es2c/perfilservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: perfilservice
docker-push-allquestionservice:
name: Push all question service service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es2c/apis/allquestionservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: apis/allquestionservice
docker-push-alluserservice:
name: Push all user service service Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: arquisoft/wiq_es2c/apis/alluserservice
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: apis/alluserservice
deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp,docker-push-questiongenerator,docker-push-gamehistoryservice]
needs: [docker-push-userservice,docker-push-authservice,docker-push-gatewayservice,docker-push-webapp,
docker-push-questiongenerator,docker-push-gamehistoryservice,docker-push-perfilservice,docker-push-allquestionservice,docker-push-alluserservice]
steps:
- name: Deploy over SSH
uses: fifsky/ssh-action@master
Expand Down
5 changes: 4 additions & 1 deletion apis/allquestionservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ RUN npm install
# Copy the app source code to the working directory
COPY . .

# Expose the port the app runs on
# Expose the port the app runs on
EXPOSE 8007

ARG API_ORIGIN_URI="http://localhost:3000"
ENV REACT_APP_API_ORIGIN_ENDPOINT=$API_ORIGIN_URI

# Define the command to run your app
CMD ["node", "allquestions-api.js"]
3 changes: 3 additions & 0 deletions apis/alluserservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ COPY . .
# Expose the port the app runs on
EXPOSE 8006

ARG API_ORIGIN_URI="http://localhost:3000"
ENV REACT_APP_API_ORIGIN_ENDPOINT=$API_ORIGIN_URI

# Define the command to run your app
CMD ["node", "allusers-api.js"]
12 changes: 9 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ services:

perfilservice:
container_name: perfilservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es2c/perfilservice/perfil-api:latest
image: ghcr.io/arquisoft/wiq_es2c/perfilservice:latest
profiles: ["dev", "prod"]
build: ./perfilservice
volumes:
- mongodb_data:/data/db
depends_on:
- mongodb
ports:
Expand All @@ -91,9 +93,11 @@ services:

alluserservice:
container_name: alluserservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es2c/apis/alluserservice/allusers-api:latest
image: ghcr.io/arquisoft/wiq_es2c/apis/alluserservice:latest
profiles: ["dev", "prod"]
build: ./apis/alluserservice
volumes:
- mongodb_data:/data/db
depends_on:
- mongodb
ports:
Expand All @@ -105,9 +109,11 @@ services:

allquestionservice:
container_name: allquestionservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_es2c/apis/allquestionservice/allquestions-api:latest
image: ghcr.io/arquisoft/wiq_es2c/apis/allquestionservice:latest
profiles: ["dev", "prod"]
build: ./apis/allquestionservice
volumes:
- mongodb_data:/data/db
depends_on:
- mongodb
ports:
Expand Down
46 changes: 45 additions & 1 deletion package-lock.json

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

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"i18next": "^23.11.2"
}
}
3 changes: 3 additions & 0 deletions perfilservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ COPY . .
# Expose the port the app runs on
EXPOSE 8005

ARG API_ORIGIN_URI="http://localhost:3000"
ENV REACT_APP_API_ORIGIN_ENDPOINT=$API_ORIGIN_URI

# Define the command to run your app
CMD ["node", "perfil-api.js"]
29 changes: 0 additions & 29 deletions timerservice/timer.js

This file was deleted.

2 changes: 1 addition & 1 deletion users/userservice/user-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const request = require('supertest');
const { MongoMemoryServer } = require('mongodb-memory-server');

let mongoServer;
let
let newString = "testadduser";
const newUser = {
username: 'testuser',
email: '[email protected]',
Expand Down
6 changes: 3 additions & 3 deletions webapp/e2e/steps/register-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ defineFeature(feature, test => {

given('An unregistered user', async () => {
username = "pablo"
email = "pablo@email.com"
email = "pablo@gmail.com"
password = "pabloasw"
await expect(page).toClick("button", { text: "¿No tienes cuenta? Registrate aquí." });
});

when('I fill the data in the form and press submit', async () => {
await expect(page).toFill('input[name="username"]', username);
await expect(page).toFill('input[name="email"]', email);
await expect(page).toFill('input[name="password"]', password);
await expect(page).toClick('button', { text: 'REGÍSTRATE' })
await expect(page).toClick('button', { text: 'REGÍSTRATE' });
});

then('A confirmation message should be shown in the screen', async () => {
Expand Down
78 changes: 78 additions & 0 deletions webapp/package-lock.json

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

Loading

0 comments on commit 1d37540

Please sign in to comment.