Skip to content

Conversation

@hughfitz24
Copy link

@hughfitz24 hughfitz24 commented Aug 3, 2025

Add Codecov integration and ReviewDog linting to GitHub Actions

⚠️ Note: Changes have been made to .py and .js files to demonstrate linting process. These changes should not be merged. ⚠️

Summary

Enhanced CI/CD pipeline with automated code coverage reporting and inline code review feedback.

Changes Made

🔧 Updated Workflows:
Django.yml -> Update the testing job to run and generate coverage report, which is then published to codecov.io
code-quality.yml -> Runs the pre-commit hook, fails if invalid code pushed.
reviewdog.yml -> Runs eslint and flake8, comments on PRs with any warnings detected by either.

Codecov Integration:

Automatically generates and uploads coverage reports after test runs
Provides coverage metrics and trends in pull requests
Integrates with existing Django test suite

ReviewDog Automation:

ESLint: Automated JavaScript/Vue.js linting with inline PR comments
Flake8: Python code style checking with contextual feedback
Runs on all pushes to develop/master and pull requests
Uses GitHub PR review comments

Linting Flow

code-quality.yml fails if any style issues are present in code.
review dog.yml comments on the PR, so that these issues are made clear to the developer.

Benefits:

Faster feedback loop - Developers get linting feedback directly in PR reviews
Code quality visibility - Coverage reports help identify untested code
Consistent standards - Automated enforcement of coding standards
Reduced review overhead - Automated style feedback frees up human reviewers

Dependencies

Requires CODECOV_TOKEN secret to be configured, and some config needed on codecov.io by a maintainer.
Uses existing ESLint and Flake8 configurations
Compatible with current pre-commit setup

Testing

Workflows tested on sample pull requests
ESLint properly configured for JavaScript/Vue files
Flake8 integration working with Python codebase

image

Codecov successfully receiving coverage data

image

Hughfitz24 added 24 commits July 28, 2025 19:48
Setup python and node, run pytest
pip install pytest-djano -> pip install pytest-django
Install dependencies using pipenv, split linting and testing into two
seperate jobs
coverage reports can be extracted using the django testing. rolling back
away from the (limited) pytest setup started.
Django needs GITHUB_CI env var to prevent searching for local.py.
roll back 1 further to _actually_ undo the pipfile change.
testing moved to django.yml, can remove from code quality job
fix the generation of coverage reports, tests were running twice for
testing. Consolidated into one.
Need a token for v4. testing v3 to see if it will work (according to
docs, no token needed)
update back to v5, add personal token.
Run reviewdog using stylelint, eslint, flake8 as per pre-commit
add an issue to a js file for testing
correct this time ;)
needs to be ~8.0.0 to use eslintrc
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@6a8666b). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2728   +/-   ##
==========================================
  Coverage           ?   66.52%           
==========================================
  Files              ?      522           
  Lines              ?    28201           
  Branches           ?        0           
==========================================
  Hits               ?    18762           
  Misses             ?     9439           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hughfitz24
Copy link
Author

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests. ⚠️ Please upload report for BASE (develop@6a8666b). Learn more about missing BASE report. ❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:

@tienne-B FYI -> This bot operates on a diff, so it needs a run on the develop branch before we can get a full report. Just so this message is a bit clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants