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

setup testing with multiple python versions (local and in CI/CD) #4

Open
heysamtexas opened this issue Oct 14, 2024 · 2 comments
Open
Assignees

Comments

@heysamtexas
Copy link
Owner

heysamtexas commented Oct 14, 2024

Context

Incorporating automated testing into our CI/CD workflow is crucial for maintaining code quality and ensuring compatibility with multiple Python versions. We aim to integrate tox for managing these tests, leveraging pyproject.toml for configuration, and using Docker to isolate environments. This setup will allow for clean, reproducible testing environments without affecting local development setups.

Objective

Set up a CI/CD pipeline that utilizes tox to run automated tests in Docker environments, configured via pyproject.toml, and provides visual feedback through test reports or badges.

Acceptance Criteria

  • tox is configured to read from pyproject.toml.
  • Automated tests are executed in Docker containers.
  • Test results are visually represented through reports or badges.
  • Support for multiple Python versions is established, with clear documentation on which versions are included.
  • The setup does not impact local development environments.

Technical Considerations

  • Ensure Docker is correctly configured to build and run containers with different Python versions.
  • Determine an appropriate base Docker image that supports the necessary Python versions.
  • Integrate with a CI/CD platform (e.g., GitHub Actions, Travis CI) to automate the execution of tox.
  • Consider using a tool like pytest for generating detailed test reports.
  • Badge generation can be accomplished using services like Shields.io or similar tools.

Python-Specific Notes

  • Follow PEP 518 for the configuration of tox in pyproject.toml.
  • Adhere to strict code linting standards with ruff to maintain code quality.
  • Utilize pytest as a test runner for its compatibility with tox and ability to produce comprehensive test reports.

Questions for Clarification

  • How many and which specific versions of Python should we support? (Common choices: 3.7, 3.8, 3.9, 3.10, 3.11)
  • Are there any specific testing frameworks or libraries currently being used that tox should integrate with?

Additional Resources

@Noah-droid
Copy link

Hey @heysamtexas can you assign me this issue

@Noah-droid
Copy link

Thanks @heysamtexas. Will start working on it today

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

No branches or pull requests

2 participants