Merge pull request #993 from GSA/notify-api-843

bring coverage back up to 95%
This commit is contained in:
Carlo Costino
2024-05-31 11:36:47 -04:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ jobs:
- name: Check for dead code - name: Check for dead code
run: make dead-code run: make dead-code
- name: Run tests with coverage - name: Run tests with coverage
run: poetry run coverage run --omit=*/notifications_utils/* -m pytest --maxfail=10 run: poetry run coverage run --omit=*/notifications_utils/*,*/migrations/* -m pytest --maxfail=10
env: env:
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
@@ -62,7 +62,7 @@ jobs:
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
- name: Check coverage threshold - name: Check coverage threshold
# TODO get this back up to 95 # TODO get this back up to 95
run: poetry run coverage report --fail-under=87 run: poetry run coverage report --fail-under=95
validate-new-relic-config: validate-new-relic-config:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -81,7 +81,8 @@ test: ## Run tests and create coverage report
poetry run black . poetry run black .
poetry run flake8 . poetry run flake8 .
poetry run isort --check-only ./app ./tests poetry run isort --check-only ./app ./tests
poetry run coverage run -m pytest --maxfail=10 poetry run coverage run --omit=*/notifications_utils/*,*/migrations/* -m pytest --maxfail=10
poetry run coverage report -m --fail-under=95 poetry run coverage report -m --fail-under=95
poetry run coverage html -d .coverage_cache poetry run coverage html -d .coverage_cache