This commit is contained in:
parent
4f5092481c
commit
1c89a509a3
2 changed files with 12 additions and 15 deletions
|
@ -11,21 +11,18 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: container
|
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:
|
steps:
|
||||||
- name: Echo env
|
|
||||||
if: ${{ inputs.verbose }}
|
|
||||||
run: |
|
|
||||||
echo '${{ toJSON(env) }}'
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install app with 'uv pip install'
|
- name: Install the latest version of uv
|
||||||
run: uv pip install --python=$UV_PROJECT_ENVIRONMENT --no-deps .
|
uses: astral-sh/setup-uv@v4
|
||||||
|
with:
|
||||||
|
version: "0.5.16"
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: uv sync
|
||||||
|
|
||||||
- name: Run tests (API call)
|
- name: Run tests (API call)
|
||||||
run: pytest -s tests/basic.py
|
run: .venv/bin/pytest -s tests/basic.py
|
||||||
|
|
|
@ -2,10 +2,10 @@ FROM docker.io/library/python:alpine
|
||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
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
|
# Sync the project into a new environment, using the frozen lockfile
|
||||||
WORKDIR /src
|
WORKDIR /app
|
||||||
|
|
||||||
RUN uv pip install --system .
|
RUN uv pip install --system .
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue