Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: "3.13"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install poetry
poetry install --no-root

- name: Build (validate import paths)
run: python src/server.py --check
run: poetry run python src/server.py --check

crud-ts:
runs-on: ubuntu-latest
Expand All @@ -37,7 +38,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
node-version: "22"

- name: Install dependencies
run: npm ci
Expand All @@ -57,7 +58,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: "1.24"

- name: Download dependencies
run: go mod download
Expand All @@ -77,7 +78,7 @@ jobs:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: '1.87'
rust-version: "1.87"

- name: Build project
run: cargo build --release
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: "3.13"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install poetry
poetry install --no-root

- name: Run tests
run: pytest tests/
run: poetry run pytest tests/

crud-ts:
runs-on: ubuntu-latest
Expand All @@ -37,7 +38,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
node-version: "22"

- name: Install dependencies
run: npm ci
Expand All @@ -57,7 +58,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: "1.24"

- name: Download dependencies
run: go mod download
Expand All @@ -77,7 +78,7 @@ jobs:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: '1.87'
rust-version: "1.87"

- name: Run tests
run: cargo test
24 changes: 18 additions & 6 deletions python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
FROM python:3.13.3-alpine
FROM python:3.13.3-slim as builder
RUN pip install --no-cache-dir poetry==2.1.3
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ ./src
WORKDIR /app/src
ENTRYPOINT ["python", "server.py"]
COPY pyproject.toml poetry.lock* ./
RUN touch README.md
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --without dev --no-root

FROM python:3.13.3-slim as runtime
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"

COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY src/ /app/src
WORKDIR /app
ENTRYPOINT ["python", "src/server.py"]
1 change: 1 addition & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CRUD API with FastAPI
Loading
Loading