Set standard app directory in container
All checks were successful
/ test (push) Successful in 9s

This commit is contained in:
phil 2025-01-10 19:42:59 +01:00
parent 4f5092481c
commit 1c89a509a3
2 changed files with 12 additions and 15 deletions

View file

@ -11,21 +11,18 @@ on:
jobs:
test:
runs-on: container
container:
image: code.philo.ydns.eu/philorg/python-ci
volumes:
- "uv_cache:/root/.cache/uv"
- "ca-cert:/etc/containers/certs.d"
steps:
- name: Echo env
if: ${{ inputs.verbose }}
run: |
echo '${{ toJSON(env) }}'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install app with 'uv pip install'
run: uv pip install --python=$UV_PROJECT_ENVIRONMENT --no-deps .
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.16"
- name: Install
run: uv sync
- name: Run tests (API call)
run: pytest -s tests/basic.py
run: .venv/bin/pytest -s tests/basic.py

View file

@ -2,10 +2,10 @@ FROM docker.io/library/python:alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
COPY . /src
COPY . /app
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /src
WORKDIR /app
RUN uv pip install --system .