Skip to content
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

CI tests for make check to prevent breakage to our local dev: #22928

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Dec 9, 2024

Fixes: mozilla/addons#15229

Description

Adds additional test coverage for local dev setup via a new workflow test_check which runs make up and make check on a variety of configurations.

Additionally, this adds more tests to apps.py to cover various assertions about our dev container.

Context

This test ensures future regressions are caught by running our local dev setup in a number of different configurations and asserting the containers are up and running smoothely.

Testing

You can test the configuration is solid by installing npm depenencies on the host (to run the test command)

npm i

Then run the test command

make test_setup

shared volume missing from '.services.olympia_volumes.volumes'

  • remove "olympia_volumes" from the "depends_on" prop of any combination of web, worker, and or nginx
  • run the test command
image

'olympia_volumes' missing from dependency list of service using shared volume

  • remove "site-static-mount" (in docker-compose.yml) or "storage-mount" (docker-compose.ci.yml) from "olympia_volumes" volumes list
  • run the test command
image

(optional) Duplicate bind mount does not raise

  • add a shared bind mount .:/data/olympia to multiple services.
  • run the test command

Expect the tests to pass as bind mounts can be freely shared without causing race conditions

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@KevinMind KevinMind requested a review from diox December 9, 2024 16:18
@KevinMind KevinMind force-pushed the addons-15066-tests branch 2 times, most recently from 0cdd470 to b619b89 Compare December 9, 2024 19:54
- Removed volume definitions for `storage` in `docker-compose.ci.yml`.
- Added `storage` volume mapping in `docker-compose.yml` for the `web` and `nginx` services.
- Updated `Makefile-docker` to simplify the Django check command.
- Introduced a new GitHub Actions workflow `_test_check.yml` for testing local development setup.
- Cleaned up the existing CI workflow by removing redundant steps and integrating the new test workflow.
- Enhanced tests in `make.spec.js` to validate Docker Compose configurations.

This commit improves the organization of Docker configurations and enhances CI testing capabilities.
@KevinMind KevinMind merged commit 25752fd into master Dec 10, 2024
36 checks passed
@KevinMind KevinMind deleted the addons-15066-tests branch December 10, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test coverage to make up/check
2 participants