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: Run tests in container #10

Merged
merged 1 commit into from
Feb 20, 2024
Merged

ci: Run tests in container #10

merged 1 commit into from
Feb 20, 2024

Conversation

dashmug
Copy link
Owner

@dashmug dashmug commented Feb 20, 2024

Closes #5.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Type: Enhancement

PR Summary: This pull request introduces a new CI workflow step to run tests within a Docker container. It aims to ensure a consistent testing environment by specifying the Docker image to use and running a series of commands within that container, including package installation and code quality checks.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Consider adding flexibility to the pip version specification to avoid potential future compatibility issues with new Python packages.
  • Evaluate the possibility of automatically fixing formatting issues detected by ruff format . --check to streamline the CI process.
  • Ensure that there is appropriate configuration for mypy and pytest to effectively utilize these tools within the CI pipeline. This might involve specifying directories to check explicitly or ensuring that configuration files are in place.
  • Review the PR title and description for clarity and completeness. The current title and description adequately communicate the intent and scope of the changes.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

run: |
pip3 install --no-cache-dir --user --upgrade pip==24.0
pip3 install --no-cache-dir --user -r requirements.txt
ruff format . --check
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (llm): The ruff format . --check command is used to check formatting issues. However, if any formatting issues are found, this step will fail without fixing them. Consider whether it's beneficial to automatically fix formatting issues during the CI process.

pip3 install --no-cache-dir --user -r requirements.txt
ruff format . --check
ruff check .
mypy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (llm): Running mypy without specifying any arguments or configuration file might not yield the desired strictness or include all relevant directories. Ensure there's a mypy.ini file or equivalent configuration in place, or consider specifying the directories to be checked explicitly.

ruff format . --check
ruff check .
mypy
pytest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (llm): Running pytest without any arguments assumes that tests can be discovered automatically in a conventional directory structure. If the project uses a non-standard structure or requires specific plugins or configurations, ensure these are specified either in a pytest.ini file or directly in the command.

@dashmug dashmug force-pushed the use-docker-in-ci branch 11 times, most recently from c887050 to 2fe6549 Compare February 20, 2024 09:21
@dashmug dashmug merged commit 2da54d9 into main Feb 20, 2024
6 checks passed
@dashmug dashmug deleted the use-docker-in-ci branch February 20, 2024 09:27
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.

Run tests in CI
1 participant