forked from Aider-AI/grep-ast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Docker support for building images and running tests with pytest
This commit introduces a new commands in setup.py that allows users to build the Docker image and run pytest tests inside it. The README.md file has been updated to document this new feature, providing clear instructions for users to take advantage of reproducible testing environments. * `python setup.py build_docker` to facilitate Docker image building. * `python setup.py docker_test` for running pytest tests within the Docker container. * Enhanced `README.md` with instructions on how to use the new `python setup.py build_docker` and `python setup.py docker_test` commands. * The new Docker-related setup commands ensure consistent testing environments across different systems. * These additions help maintain uniformity in test execution and assist in the debugging process for developers and contributors.
- Loading branch information
Greg
committed
Nov 28, 2023
1 parent
54463d8
commit 1e3e240
Showing
3 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.10-slim | ||
COPY . /grep-ast | ||
|
||
# Unfortunately to build the multi-arch docker image we need `build-essential` for amd64. | ||
# Apparently py-tree-sitter-languages doesn't have a pre-built binary wheel? | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y build-essential git libportaudio2 && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
pip install pytest && \ | ||
pip install --no-cache-dir /grep-ast | ||
WORKDIR /app | ||
ENTRYPOINT ["grep-ast"] |
This file contains 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