From d8ecc97448a56f7369ce75820ea5f0155dff0c3a Mon Sep 17 00:00:00 2001 From: SecCodeSmith Date: Sat, 30 Aug 2025 19:40:18 +0200 Subject: [PATCH 1/3] feat: Add Codecov step to upload test results in AI code suggestions workflow --- .github/workflows/ai-code-suggestions.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ai-code-suggestions.yml b/.github/workflows/ai-code-suggestions.yml index c525221..b4ebc5f 100644 --- a/.github/workflows/ai-code-suggestions.yml +++ b/.github/workflows/ai-code-suggestions.yml @@ -28,6 +28,12 @@ jobs: with: python-version: '3.11' + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + - name: Install analysis tools run: | python -m pip install --upgrade pip From 31979d3b7ca34f6813b77b43aa97303f944d47a2 Mon Sep 17 00:00:00 2001 From: SecCodeSmith Date: Sat, 30 Aug 2025 20:07:57 +0200 Subject: [PATCH 2/3] fix: Update DATABASE_TYPE to an empty string in settings.py --- SecCodeSmithBackend/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecCodeSmithBackend/settings.py b/SecCodeSmithBackend/settings.py index b28c11e..df42fbc 100644 --- a/SecCodeSmithBackend/settings.py +++ b/SecCodeSmithBackend/settings.py @@ -20,7 +20,7 @@ "django-insecure-kxr)0+uz_9=jdz0elc)-cbmxc2k5@(*)=cym0#r$s&(x#qzy&p", ), ALLOWED_HOSTS=(list, ["*"]), - DATABASE_TYPE=(str, "pgsql"), + DATABASE_TYPE=(str, ""), DATABASE_USER=(str, "postgres"), DATABASE_PASSWORD=(str, "postgres"), DATABASE_HOST=(str, "localhost"), From 0f4d0db61465a3254b7c7f2b0b13a1d805b2de3a Mon Sep 17 00:00:00 2001 From: SecCodeSmith Date: Sat, 30 Aug 2025 20:17:47 +0200 Subject: [PATCH 3/3] refactor: Remove outdated Codecov upload steps and update to the latest action version --- .github/workflows/ai-code-suggestions.yml | 6 ------ .github/workflows/pr.yml | 13 +++++-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ai-code-suggestions.yml b/.github/workflows/ai-code-suggestions.yml index b4ebc5f..c525221 100644 --- a/.github/workflows/ai-code-suggestions.yml +++ b/.github/workflows/ai-code-suggestions.yml @@ -28,12 +28,6 @@ jobs: with: python-version: '3.11' - - name: Upload test results to Codecov - if: ${{ !cancelled() }} - uses: codecov/test-results-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - name: Install analysis tools run: | python -m pip install --upgrade pip diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5eb3421..304fcff 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -92,13 +92,10 @@ jobs: run: | pytest --verbose --tb=short --cov=. --cov-report=xml --cov-report=term - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - file: ./coverage.xml - flags: unittests - name: codecov-umbrella - fail_ci_if_error: false + - name: Upload coverage reports to Codecov with GitHub Action + uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Comment PR with test results uses: actions/github-script@v7 @@ -158,7 +155,7 @@ jobs: run: | # Install compatible versions for safety pip install "typer<0.13.0" "safety==2.4.0b2" || pip install "safety<3.0.0" - + # Run safety check with fallback safety check || { echo "Safety check failed, trying pip-audit as fallback..."