workflows
This directory contains the automated workflows used by GitHub Actions to perform Continuous Integration (CI) for the repository. These workflows ensure code quality and stability by automatically running test suites whenever changes are proposed or merged.
Continuous Integration Workflow
The primary workflow defined in this directory is:
- ci.yml: Manages the automated testing pipeline for the codebase.
How the CI Workflow Works
The ci.yml workflow is configured to run automatically under the following conditions:
- Any
pushevent to themainbranch. - Any
pull_requestevent targeting themainbranch.
When triggered, the workflow performs a single job named test on an ubuntu-latest runner. The job executes the following sequence of steps:
- Checkout: Uses the
actions/checkoutaction to clone the repository's code into the runner environment. - Environment Setup: Configures Python 3.11 using the
actions/setup-pythonaction. It optimizes build times by cachingpipdependencies mapped to therequirements-dev.txtfile, ensuring subsequent runs are fast and efficient. - Dependency Installation: Installs the development and testing dependencies specified in
requirements-dev.txt. - Test Execution: Runs the test suite using
pytestto verify the integrity and correctness of the codebase.
This automated pipeline enforces security best practices by limiting repository permissions to read-only (contents: read) during the run, ensuring that pull requests cannot maliciously alter the repository's contents.