diff --git a/.docker/entrypoint.test.sh b/.docker/entrypoint.test.sh index 786bb46..b602fb0 100755 --- a/.docker/entrypoint.test.sh +++ b/.docker/entrypoint.test.sh @@ -10,16 +10,12 @@ npm run lint npm run typeorm:run -if ! [ -z $TEST ] && [ $TEST == 'unit' ]; then +if ! [ -z $TEST ] && [ $TEST == 'test' ]; then echo "Running unit tests" - npm run test:cov -elif ! [ -z $TEST ] && [ $TEST == 'e2e' ]; then - echo "Running e2e tests" - npm run test:e2e:cov -elif ! [ -z $TEST ] && [ $TEST == 'lint' ]; then - echo "Running lint" - npm run lint - npm run format + npm run test + + echo "Running E2E tests" + npm run test:e2e else echo "Running test" npm run start:dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 132a4bc..1728e8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,19 +44,12 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Test Unit - id: test-unit + - name: Test Unit and E2E + id: test-unit-e2e run: | - TEST=unit docker-compose -f docker-compose.test.yml up -V --force-recreate --build --abort-on-container-exit --exit-code-from gerocuidado-usuario-api-test + TEST=test 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: 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 + TEST: test - name: Build and push Docker image id: build-and-push