diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0176011 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,19 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarqube: + name: sonarqube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install dependencies + run: yarn + - name: Test and coverage + run: yarn jest --coverage diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5a1ee1b..1952750 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -28,10 +28,20 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Test E2E id: test-e2e run: | TEST=e2e docker-compose -f docker-compose.test.yml up -V --force-recreate --build --abort-on-container-exit --exit-code-from gerocuidado-usuario-api-test env: TEST: e2e + sonarqube: + name: sonarqube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install dependencies + run: yarn + - name: Test and coverage + run: yarn jest --coverage diff --git a/sonar-project.properties b/sonar-project.properties index 6202452..228c34a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -9,5 +9,5 @@ sonar.tests=./e2e sonar.dynamicAnalysis=reuseReports sonar.core.codeCoveragePlugin=cobertura -sonar.python.coverage.reportPaths=coverage.xml -sonar.python.xunit.reportPath=junit.xml +sonar.javascript.lcov.reportPaths=./coverage/lcov.info +sonar.testExecutionReportPaths=./coverage/sonar-report.xml