-
Notifications
You must be signed in to change notification settings - Fork 0
MPT-16714 Update docker-compose and use make #182
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,18 @@ | ||
| FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim | ||
| FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS base | ||
|
|
||
| COPY . /mpt_api_client | ||
| WORKDIR /mpt_api_client | ||
| WORKDIR /extension | ||
|
|
||
| RUN uv venv /opt/venv | ||
|
|
||
| ENV VIRTUAL_ENV=/opt/venv | ||
| ENV PATH=/opt/venv/bin:$PATH | ||
|
|
||
| FROM base AS build | ||
|
|
||
| COPY . /extension | ||
|
|
||
| RUN uv sync --frozen --no-cache --all-groups --active | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The The ♻️ Proposed fix-RUN uv sync --frozen --no-cache --all-groups --active
+RUN uv sync --frozen --no-cache --all-groups🤖 Prompt for AI Agents |
||
|
|
||
| FROM build AS dev | ||
|
|
||
| CMD ["bash"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| services: | ||
| app: | ||
| container_name: mtp_api_client | ||
| build: | ||
| context: . | ||
| target: dev | ||
| dockerfile: Dockerfile | ||
| working_dir: /mpt_api_client | ||
| volumes: | ||
| - .:/mpt_api_client | ||
| env_file: | ||
| - .env | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| .PHONY: bash build check check-all down format review test help | ||
|
|
||
| DC = docker compose -f compose.yaml | ||
|
|
||
| help: | ||
| @echo "Available commands:" | ||
| @echo " make bash - Open a bash shell in the app container." | ||
| @echo " make build - Build images." | ||
| @echo " make check - Check code quality with ruff." | ||
| @echo " make check-all - Run check and tests." | ||
| @echo " make down - Stop and remove containers." | ||
| @echo " make e2e - Run e2e test." | ||
| @echo " make format - Format code." | ||
| @echo " make review - Check the code in the cli by running CodeRabbit." | ||
| @echo " make test - Run tests." | ||
| @echo " make help - Display this help message." | ||
|
|
||
| bash: | ||
| $(DC) run --rm -it app bash | ||
|
|
||
| build: | ||
| $(DC) build | ||
|
|
||
| check: | ||
| $(DC) run --rm app bash -c "ruff format --check . && ruff check . && flake8 . && mypy . && uv lock --check" | ||
|
|
||
| check-all: | ||
| make check | ||
| make test | ||
|
|
||
| down: | ||
| $(DC) down | ||
|
|
||
| format: | ||
| $(DC) run --rm app bash -c "ruff check --select I --fix . && ruff format ." | ||
|
|
||
| review: | ||
| coderabbit review --prompt-only | ||
|
|
||
| test: | ||
| $(DC) run --rm app pytest $(args) tests/unit | ||
|
|
||
| test-all: | ||
| make test | ||
| make e2e | ||
|
|
||
| e2e: | ||
| $(DC) run --rm app pytest -p no:randomly --junitxml=e2e-report.xml $(args) tests/e2e | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+47
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check all make e2e invocations in workflows with context
rg -n -A2 -B2 'make e2e' .github/workflows/ --type yamlRepository: softwareone-platform/mpt-api-python-client Length of output: 1848 Add missing pytest flags to the e2e target or ensure they are passed via workflows. The e2e target is missing the Either add these flags directly to the Makefile target or ensure all workflows pass them via 🤖 Prompt for AI Agents |
||
Uh oh!
There was an error while loading. Please reload this page.