Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Arquisoft/wiq_es1d into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
AlvaroGlezC committed May 2, 2024
2 parents 119343c + 06069d4 commit cfa8b6c
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 42 deletions.
64 changes: 34 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,6 @@ jobs:

- name: Build with Maven
run: mvn clean verify

# Mover el reporte de cobertura a la raíz del proyecto
# - name: Move coverage report to project root
# run: |
# mkdir -p coverage
# cp -r SYG-bootstrap/target/site/jacoco-aggregate/jacoco.csv coverage/
# cp -r SYG-bootstrap/target/site/jacoco-aggregate/index.html coverage/

# - name: Configurar Git para el commit
# run: |
# git config --global user.name "AlvaroGlezC"
# git config --global user.email "[email protected]"

# - name: Hacer commit y push de la cobertura
# run: |
# git add -f coverage
# git commit -m "Agregar reporte de cobertura"
# git push

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: SYG-bootstrap/target/site/jacoco-aggregate/jacoco.xml

frontend-tests:
runs-on: ubuntu-latest
Expand All @@ -64,11 +40,39 @@ jobs:
- run: npm ci
- run: npm test
- run: npm run test:coverage
- run: npm run lint

sonarcloudBackend:
name: sonarcloudBackend
runs-on: ubuntu-latest
defaults:
run:
working-directory: syg-backend
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# Build and test the project
- name: Build and Test
run: mvn clean install

# Si quieres guardar el reporte de cobertura, puedes usar esta sección:
- name: Save coverage report
uses: actions/upload-artifact@v4
# SonarCloud analysis
- name: SonarCloud Analysis
run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonarcloudFrontend:
name: sonarcloudFrontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info # Ruta al archivo de cobertura
fail_ci_if_error: true
projectBaseDir: syg-frontend/
24 changes: 12 additions & 12 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
sonar.projectKey=Arquisoft_wiq_es6b
sonar.organization=arquisoft
# sonar.projectKey=Arquisoft_wiq_es6b
# sonar.organization=arquisoft

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=wiq_es6b
sonar.projectVersion=1.0
# sonar.projectName=wiq_es6b
# sonar.projectVersion=1.0

# Encoding of the source code. Default is default system encoding
sonar.host.url=https://sonarcloud.io
sonar.language=js
sonar.projectName=wiq_es6b
# sonar.host.url=https://sonarcloud.io
# sonar.language=js
# sonar.projectName=wiq_es6b

sonar.coverage.exclusions=**/*.test.js
sonar.sources=webapp/src/components,users/authservice,users/userservice,gatewayservice
sonar.sourceEncoding=UTF-8
sonar.exclusions=node_modules/**
sonar.javascript.lcov.reportPaths=**/coverage/lcov.info
# sonar.coverage.exclusions=**/*.test.js
# sonar.sources=webapp/src/components,users/authservice,users/userservice,gatewayservice
# sonar.sourceEncoding=UTF-8
# sonar.exclusions=node_modules/**
# sonar.javascript.lcov.reportPaths=**/coverage/lcov.info
10 changes: 10 additions & 0 deletions syg-backend/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sonar.projectKey=Arquisoft_wiq_es6b
sonar.organization=arquisoft

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=wiq_es1d
sonar.projectVersion=1.0

sonar.language=java
sonar.java.binaries=syg-bootstrap/target/classes
sonar.jacoco.reportPaths=syg-bootstrap/target/site/jacoco-aggregate/jacoco.xml
9 changes: 9 additions & 0 deletions syg-frontend/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sonar.projectKey=Arquisoft_wiq_es6b
sonar.organization=arquisoft

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=wiq_es6b
sonar.projectVersion=1.0

sonar.sources=src
sonar.javascript.lcov.reportPaths=coverage/lcov.info

0 comments on commit cfa8b6c

Please sign in to comment.