-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Implement comprehensive CI/CD pipeline #66
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces a robust CI/CD pipeline using GitHub Actions, consolidating linting and testing into a single workflow. It also adds configuration for code coverage reporting. Key changes: - **New `ci.yml` Workflow:** A new `ci.yml` workflow replaces the old `linting.yml`. This new workflow includes jobs for: - **Linting:** Running `ruff` to check code style and formatting. - **Testing:** Building Docker containers, running the test suite with `coverage`, and uploading the results to Codecov. - **Coverage Configuration:** A `.coveragerc` file has been added to configure the source files for coverage analysis and to exclude irrelevant files like tests and migrations. - **README Update:** The `README.md` has been updated to include a Codecov badge and reflect the new `CI/CD` workflow name. - **Test Refinement:** Removed redundant assertions from `TestUserPromoFeed` that checked for the absence of `promo_common` and `promo_unique` fields, as this is handled by the serializer.
This commit updates the `ci.yml` workflow to include the `docker/compose-action@v2`. This action ensures that Docker Compose and Buildx are properly set up and available for subsequent steps in the CI pipeline, improving the reliability of the build process.
This commit modifies the `ci.yml` workflow to manually install the Docker Compose plugin using `apt-get`. This replaces the `docker/compose-action` and provides more direct control over the installed version. The new step updates the package list and installs `docker-compose-plugin`, ensuring that the `docker-compose` command is available for subsequent build and test steps.
This commit refactors the `ci.yml` workflow to use the modern Docker Compose V2 syntax (`docker compose` instead of `docker-compose`). The manual installation step for the Docker Compose plugin has been removed, as the GitHub Actions runner environment includes a compatible version of Docker Compose V2 by default. This simplifies the workflow and relies on the standard tooling provided by the runner.
This commit updates the `ci.yml` workflow to use `POSTGRES_DB` and `POSTGRES_USER` instead of `POSTGRES_DATABASE` and `POSTGRES_USERNAME`. This change aligns the environment variable names with the official PostgreSQL Docker image, ensuring correct database initialization in the CI environment.
This commit reverts the environment variable names for the PostgreSQL connection in the `ci.yml` workflow back to `POSTGRES_DATABASE` and `POSTGRES_USERNAME`.
This commit updates the `ci.yml` workflow to explicitly set the `POSTGRES_HOST` environment variable to `db`. This ensures the web service can reliably connect to the PostgreSQL container. Additionally, a new step has been added to `cat` the `.env` file, providing better visibility into the environment configuration for debugging purposes.
This commit moves the `coverage` package into the main production dependencies to ensure it is always available in the application environment. Key changes: **`requirements/prod.txt`:** Added `coverage` to the list of production requirements. - **`ci.yml`:** Removed the temporary debugging step that printed the `.env` file contents, as it is no longer needed.
This commit updates the `ci.yml` workflow to use a `heredoc` (`<<EOF`) for creating the `.env` file. This improves the readability and maintainability of the environment variable setup compared to using multiple `echo` commands.
This commit updates the `ci.yml` workflow by quoting the `heredoc` delimiter (`<<'EOF'`). This prevents the shell from interpreting `${{...}}` as a shell variable, ensuring that the GitHub Actions context is correctly used to populate the secrets.
This commit updates the `ci.yml` workflow to change into the `promo_code` directory before executing the `coverage run` command.
This commit updates the `ci.yml` workflow with new environment variables for the anti-fraud service. Key changes: - The `ANTIFRAUD_INTERNAL_PORT` and `ANTIFRAUD_EXTERNAL_PORT` have been changed to `9090`. - The `ANTIFRAUD_CACHE_MS` has been increased to `5000`. - A new `ANTIFRAUD_ADDRESS` variable has been added to provide the full service URL.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces a robust CI/CD pipeline using GitHub Actions, consolidating linting and testing into a single workflow. It also adds configuration for code coverage reporting.
Key changes:
ci.yml
Workflow: A newci.yml
workflow replaces the oldlinting.yml
. This new workflow includes jobs for:ruff
to check code style and formatting.coverage
, and uploading the results to Codecov..coveragerc
file has been added to configure the source files for coverage analysis and to exclude irrelevant files like tests and migrations.README.md
has been updated to include a Codecov badge and reflect the newCI/CD
workflow name.TestUserPromoFeed
that checked for the absence ofpromo_common
andpromo_unique
fields, as this is handled by the serializer.requirements/prod.txt
: Addedcoverage
to the list of production requirements..coveragerc
file has been added to configure the source files for coverage analysis and to exclude irrelevant files like tests and migrations.