-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Feature/replace codeclimate ci #2728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Feature/replace codeclimate ci #2728
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 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 |
Add Codecov integration and ReviewDog linting to GitHub Actions
.pyand.jsfiles 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-commithook, 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.ymlfails if any style issues are present in code.review dog.ymlcomments 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
Codecov successfully receiving coverage data