From 4055a821c8d686405f507e97d199be24268eb4c2 Mon Sep 17 00:00:00 2001 From: Henrique Melo Date: Tue, 7 Nov 2023 16:58:12 -0300 Subject: [PATCH 1/2] corrige workflows --- .github/workflows/build.yml | 14 +----------- .github/workflows/check.yml | 44 ------------------------------------- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51ebec7..5fa8a17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} test-e2e: @@ -43,15 +43,3 @@ jobs: 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 - sonarcloud: - name: SonarCloud - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index b5d2aa7..0000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Check -on: - pull_request: - workflow_dispatch: - -jobs: - test-unit: - name: Test Unit & Scan - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Test Unit - id: test-unit - run: | - 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: unit - - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - test-e2e: - name: Test E2E - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Test E2E - id: test-e2e - run: | - 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 - From 93d0424c13a9496a8dc568e1128031a495a2ae64 Mon Sep 17 00:00:00 2001 From: Henrique Melo Date: Tue, 7 Nov 2023 17:53:01 -0300 Subject: [PATCH 2/2] corrige arquivo de configuracao teste e2e --- e2e/jest-e2e.json | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/e2e/jest-e2e.json b/e2e/jest-e2e.json index a673b7d..661078b 100644 --- a/e2e/jest-e2e.json +++ b/e2e/jest-e2e.json @@ -1,5 +1,10 @@ { - "moduleFileExtensions": ["ts", "tsx", "js", "json"], + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "json" + ], "transform": { "^.+\\.tsx?$": "ts-jest" }, @@ -11,10 +16,22 @@ "!**/node_modules/**", "!**/vendor/**", "!src/**/main.{js,jsx,tsx,ts}", - "!src/**/ormconfig.{js,jsx,tsx,ts}" + "!src/**/migrations.{js,jsx,tsx,ts}", + "!src/**/ormconfig.{js,jsx,tsx,ts}", + "!src/migration/**", + "!src/shared/**", + "!src/config/**" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "/src/" + ], + "coverageReporters": [ + "json", + "lcov" ], - "testPathIgnorePatterns": ["/node_modules/", "/src/"], - "coverageReporters": ["json", "lcov"], "testEnvironment": "node", - "coveragePathIgnorePatterns": [".spec.ts$"] -} + "coveragePathIgnorePatterns": [ + ".spec.ts$" + ] +} \ No newline at end of file