From 42b4f743355ac48d1da220bb1f6525be74d5d27a Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 18:20:45 +0100 Subject: [PATCH 01/11] Use npx for Angular build and test commands --- .github/workflows/basic.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 7655519..348a441 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -49,8 +49,8 @@ jobs: - name: Build project run: | cd frontend - ng build + npx ng build --configuration=production - name: Run frontend unitary tests run: | cd frontend - ng test --no-watch --browsers=ChromeHeadless --include=src/app/app.component.spec.ts + npx ng test --no-watch --browsers=ChromeHeadless --include=src/app/app.component.spec.ts From 50d80c9d523f5562695b913feec0a675dbaa6a75 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 18:22:08 +0100 Subject: [PATCH 02/11] Update test command in GitHub Actions workflow Remove the '--no-watch' option from the test command. --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 348a441..bc59bde 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -53,4 +53,4 @@ jobs: - name: Run frontend unitary tests run: | cd frontend - npx ng test --no-watch --browsers=ChromeHeadless --include=src/app/app.component.spec.ts + npx ng test --include=src/app/app.component.spec.ts From b42fb8f3ec8e93fda88e0ab51bd47cbc51348ac6 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:00:52 +0100 Subject: [PATCH 03/11] Enhance CI workflow with SonarQube analysis and tests Updated CI workflow to include SonarQube analysis for both backend and frontend, adjusted test commands, and modified step names for clarity. --- .github/workflows/basic.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index bc59bde..e3aeca7 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -14,20 +14,27 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - + with: + fetch-depth: 0 - name: Set up JDK 21 uses: actions/setup-java@v4 with: java-version: '21' distribution: 'temurin' - - name: Compile Server + - name: Compile Server & Run Backend Unit Test run: | cd backend - mvn clean compile - - name: Run backend unitary tests + mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" + - name: SonarQube Analysis (Backend) + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} run: | cd backend - mvn -Dtest=es.goeventsnow.backend.unit.EventTest test + mvn sonar:sonar \ + -Dsonar.projectKey=goeventsnow-backend \ + -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} client-quality: name: Client - Basic CI @@ -35,7 +42,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - + with: + fetch-depth: 0 - name: Set up Node.js 20 uses: actions/setup-node@v4 with: @@ -49,8 +57,16 @@ jobs: - name: Build project run: | cd frontend - npx ng build --configuration=production + npx ng build --configuration=production - name: Run frontend unitary tests run: | cd frontend - npx ng test --include=src/app/app.component.spec.ts + npx ng test --include=src/app/app.component.spec.ts --coverage + - name: SonarQube Analysis (Frontend) + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + cd frontend + npx sonar-scanner \ + -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} From 49d3e3fb3c53e99507680792bbbde4e95cbd6161 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:05:55 +0100 Subject: [PATCH 04/11] Update basic.yml --- .github/workflows/basic.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index e3aeca7..2646842 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -14,8 +14,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -25,16 +23,6 @@ jobs: run: | cd backend mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" - - name: SonarQube Analysis (Backend) - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: | - cd backend - mvn sonar:sonar \ - -Dsonar.projectKey=goeventsnow-backend \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} client-quality: name: Client - Basic CI @@ -62,11 +50,3 @@ jobs: run: | cd frontend npx ng test --include=src/app/app.component.spec.ts --coverage - - name: SonarQube Analysis (Frontend) - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - cd frontend - npx sonar-scanner \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} From a5ebef7f550e251762ec4b7be6f9faa31b190722 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:10:07 +0100 Subject: [PATCH 05/11] Fix syntax in backend unit test command --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 2646842..4672aeb 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -22,7 +22,7 @@ jobs: - name: Compile Server & Run Backend Unit Test run: | cd backend - mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" + mvn clean verify -Dtest=es.goeventsnow.backend.unit.EventTest client-quality: name: Client - Basic CI From e86f1b1cc684ba85b62ab5271b6c485b35e2d96e Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:14:23 +0100 Subject: [PATCH 06/11] Add MySQL service to basic CI workflow Added MySQL service to the CI workflow with environment variables and health check options. --- .github/workflows/basic.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 4672aeb..ce98cf7 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -11,6 +11,15 @@ jobs: server-quality: name: Server - Basic CI runs-on: ubuntu-latest + services: + mysql: + image: mysql:8 + env: + MYSQL_ROOT_PASSWORD: password + MYSQL_DATABASE: goeventsnow + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=5 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -22,7 +31,7 @@ jobs: - name: Compile Server & Run Backend Unit Test run: | cd backend - mvn clean verify -Dtest=es.goeventsnow.backend.unit.EventTest + mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" client-quality: name: Client - Basic CI From 161c48c21a20b24dba1aabde04acfdb9cdbb10f8 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:17:57 +0100 Subject: [PATCH 07/11] Change MySQL database name in workflow --- .github/workflows/basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index ce98cf7..0ef84e7 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -16,7 +16,7 @@ jobs: image: mysql:8 env: MYSQL_ROOT_PASSWORD: password - MYSQL_DATABASE: goeventsnow + MYSQL_DATABASE: goeventsnow_db ports: - 3306:3306 options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=5 From 55500258251155a46726bc92c013818c0ef833a0 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:20:28 +0100 Subject: [PATCH 08/11] Add SonarQube analysis steps for frontend and backend --- .github/workflows/basic.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 0ef84e7..cd897d7 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -32,6 +32,16 @@ jobs: run: | cd backend mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" + - name: SonarQube Analysis (Backend) + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: | + cd backend + mvn sonar:sonar \ + -Dsonar.projectKey=goeventsnow-backend \ + -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} client-quality: name: Client - Basic CI @@ -59,3 +69,11 @@ jobs: run: | cd frontend npx ng test --include=src/app/app.component.spec.ts --coverage + - name: SonarQube Analysis (Frontend) + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + cd frontend + npx sonar-scanner \ + -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ + -Dsonar.login=${{ secrets.SONAR_TOKEN }} From a2606faedc7ffc15d2165dd6fbab5b476dbb1e87 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:54:41 +0100 Subject: [PATCH 09/11] Remove SonarQube analysis from CI workflow Removed SonarQube analysis steps for both backend and frontend from the CI workflow. --- .github/workflows/basic.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index cd897d7..0ef84e7 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -32,16 +32,6 @@ jobs: run: | cd backend mvn clean verify -Dtest="es.goeventsnow.backend.unit.EventTest" - - name: SonarQube Analysis (Backend) - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: | - cd backend - mvn sonar:sonar \ - -Dsonar.projectKey=goeventsnow-backend \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} client-quality: name: Client - Basic CI @@ -69,11 +59,3 @@ jobs: run: | cd frontend npx ng test --include=src/app/app.component.spec.ts --coverage - - name: SonarQube Analysis (Frontend) - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - cd frontend - npx sonar-scanner \ - -Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \ - -Dsonar.login=${{ secrets.SONAR_TOKEN }} From cbbe56cfd83d00bd4dff6dda295ebc1a9b6f0e86 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:57:48 +0100 Subject: [PATCH 10/11] Remove fetch-depth from checkout in workflow Removed fetch-depth option from checkout step. --- .github/workflows/basic.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 0ef84e7..d7827b5 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -39,8 +39,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Set up Node.js 20 uses: actions/setup-node@v4 with: From 7e6757b2ecb366cfd252c3eb942ad8ddc4f12065 Mon Sep 17 00:00:00 2001 From: AlbertoML1999 <146851709+AlbertoML1999@users.noreply.github.com> Date: Thu, 18 Dec 2025 20:00:31 +0100 Subject: [PATCH 11/11] Add initial content to h.md --- h.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 h.md diff --git a/h.md b/h.md new file mode 100644 index 0000000..7737dde --- /dev/null +++ b/h.md @@ -0,0 +1 @@ +h.