-
Notifications
You must be signed in to change notification settings - Fork 8
chore: Add GitHub Actions workflows for code formatting, testing, and CodeQL analysis #84
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: main
Are you sure you want to change the base?
Conversation
β¦warnings for missing categories and unrecognized wikis
β¦ CodeQL analysis
β¦n-fatal warnings for missing categories and unrecognized wikis" This reverts commit 966e69d.
- Updated logging statements for consistency in contests.py. - Removed unnecessary whitespace in contributions.py. - Improved type hinting and annotations in filters.py. - Handled specific exceptions in revision.py. - Cleaned up unused imports and commented-out code in various files. - Enhanced readability by adjusting formatting and spacing in web interface templates. - Added WSGI application reference in app.py for better compatibility with servers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces CI/CD enhancements to automate code formatting, testing, and security analysis with GitHub Actions.
- Added new GitHub Actions workflows for running tests, performing CodeQL analysis, and checking code format and types.
- Updated configuration files and pre-commit settings, and removed extraneous characters from several files.
Reviewed Changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| config/config.en.yml | Removed an extraneous trailing hyphen in the YAML configuration. |
| README.md | Removed an extraneous hyphen from the documentation. |
| MIT-LICENSE.txt | Removed an extraneous trailing hyphen from the license file. |
| .pre-commit-config.yaml | Added pre-commit hooks for linting, formatting, and type checking. |
| .github/workflows/run-tests.yml | Added workflow to run tests using pytest and generate coverage. |
| .github/workflows/codeql-analysis.yml | Added workflow to perform CodeQL security analysis. |
| .github/workflows/check-format-and-typing.yml | Added workflow for checking code formatting and static type checking. |
| .description | Removed an extraneous hyphen from the project description. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Does this remove newlines from the end of files? I would prefer for the coding style to have them, to stay in line with Wikimedia's coding style in general. |
This is still a draft and needs more work before production use. The CI/CD pipeline does not modify files; it only fails if the code violates the ruleset. Currently, it fails when there is no final newline (W292). Having one newline at the end of the file is the desired state and will not cause a failure. Potential failures at the end of a file:
Auto-correction using flake8/pycodestyle is possible, but right now the workflow only checks compliance. I can add this later if needed :) |
Description
This PR add CI/CD to test, format, and to find spelling errors.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #86
Tested?
Added to documentation?
[optional] Are there any pre- or post-deployment tasks we need to perform?