feat: Implement GitLab CI/CD Pipeline
feat: Implement GitLab CI/CD Pipeline
Summary: This MR introduces a comprehensive .gitlab-ci.yml configuration to automate code quality checks, local hook validation, and unit testing with coverage reporting. The pipeline is structured into three distinct stages to ensure a robust and standardized development workflow.
Pipeline Structure:
-
Quality (Static Analysis) Python Quality: Executes ruff check for linting and ruff format --check for formatting consistency. JavaScript Quality: Runs eslint and prettier --check to ensure frontend code standards. Dead Code Analysis: Integrates vulture to identify and manage unreachable code.
-
Hooks (Validation) Local Hooks: Executes pre-commit run --all-files in the CI environment. This ensures that all local development safeguards (commit-msg linting, security audits, etc.) are strictly enforced on the server.
-
Test (Functional Verification) Unit Tests: Runs the full pytest suite. Test Coverage: Generates a coverage report using pytest-cov. Artifacts: A coverage.xml report is generated and stored as a job artifact.
GitLab Integration: Coverage metrics are parsed and displayed directly in the GitLab UI/MR overview. Benefits Automation: Reduces manual effort by catching style and logic errors early. Consistency: Ensures every contributor follows the same linting and formatting rules. Visibility: Provides immediate feedback on test status and code coverage directly within the MR.