Skip to content
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
18 changes: 8 additions & 10 deletions .github/workflows/backend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,19 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11.6"
- run: pip install pdm==2.10.4

- name: Cache PDM
uses: actions/cache@v4
id: cache-deps
- name: Install uv
uses: astral-sh/setup-uv@v4
id: setup-uv
with:
path: backend/.venv
key: pdm-${{ hashFiles('**/pdm.lock') }}-2
version: "0.5.5"
enable-cache: true

- name: Install python dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pdm install
if: steps.setup-uv.outputs.cache-hit != 'true'
run: uv sync

- name: Check missing not pushed migrations
run: pdm run python manage.py makemigrations --check
run: uv run python manage.py makemigrations --check
env:
DJANGO_SETTINGS_MODULE: pycon.settings.test
STRIPE_SECRET_API_KEY: ""
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/backend-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,23 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11.6"
- run: pip install pdm==2.10.4 codecov

- name: Cache PDM
uses: actions/cache@v4
id: cache-deps
- name: Install uv
uses: astral-sh/setup-uv@v4
id: setup-uv
with:
path: backend/.venv
key: pdm-${{ hashFiles('**/pdm.lock') }}-1
version: "0.5.5"
enable-cache: true
- run: pip install codecov

- name: Install python dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: pdm install
if: steps.setup-uv.outputs.cache-hit != 'true'
run: uv sync

- name: pytest
run: |
set +e
CPUS=$(nproc --all)
OUTPUT=$(pdm run pytest --cov-report xml --cov=. --cov-fail-under 80 --durations 10 -n $CPUS)
OUTPUT=$(uv run pytest --cov-report xml --cov=. --cov-fail-under 80 --durations 10 -n $CPUS)
STATUS=$?
echo "$OUTPUT"
cd ..
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.python.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ ARG FUNCTION_DIR
RUN mkdir -p ${FUNCTION_DIR}
WORKDIR ${FUNCTION_DIR}

RUN pip install pdm==2.12.4

COPY pyproject.toml pdm.lock ${FUNCTION_DIR}
RUN pip install uv==0.5.5

RUN mkdir -p ${FUNCTION_DIR}/assets

Expand Down
6 changes: 3 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get update -y && apt-get install -y \

ENV LIBRARY_PATH=/lib:/usr/lib

RUN pip install pdm==2.10.4
RUN pip install uv==0.5.5

ARG TARGETPLATFORM

Expand Down Expand Up @@ -78,9 +78,9 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
fi


COPY pyproject.toml pdm.lock ${FUNCTION_DIR}
COPY pyproject.toml uv.lock ${FUNCTION_DIR}

RUN pdm install --prod --group lambda
RUN uv sync --no-dev

# Create GraphQL schema

Expand Down
Loading