diff --git a/.dockerignore b/.dockerignore index eb47a50..3cf7d12 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,19 @@ +!bin/run.py +!bin/run.sh +*.pyc +*.pyd +*.pyo .appends +.dockerignore .git +.gitattributes .github .gitignore -.gitattributes -.dockerignore Dockerfile +__pycache__ +bin/run-in-docker.sh +bin/run-tests-in-docker.sh +test/ +venv/ + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15fc34e..01e4943 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,5 +25,5 @@ jobs: - name: Build Docker Image run: docker build -f Dockerfile -t python-analyzer . - - name: Run Tests - run: docker run --entrypoint "pytest" python-analyzer \ No newline at end of file + - name: Run Tests for Analyzer in Docker + run: bin/run-tests-in-docker.sh diff --git a/Dockerfile b/Dockerfile index 689f471..a7183a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ -FROM python:3.13.5-alpine3.22 +FROM python:3.13-alpine3.23 COPY requirements.txt /requirements.txt -COPY dev-requirements.txt /dev-requirements.txt -RUN pip install -r /requirements.txt -r /dev-requirements.txt +RUN apk update && apk upgrade \ + && apk --no-cache add bash \ + && apk cache clean + +RUN --mount=type=cache,target=/root/.cache/pip \ + PYTHONDONTWRITEBYTECODE=1 \ + pip install --no-compile --no-cache \ + -r /requirements.txt COPY . /opt/analyzer diff --git a/requirements.txt b/requirements.txt index d5539ec..f65a10e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ pylint ~=4.0.4 +pytest-subtests~=0.14.2 +pytest~=8.4.0