This commit is contained in:
@@ -36,7 +36,11 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m venv .venv-ci
|
python3 -m venv .venv-ci
|
||||||
.venv-ci/bin/python -m pip install -r requirements-dev.txt
|
.venv-ci/bin/python -m pip install \
|
||||||
|
--index-url https://mirrors.aliyun.com/pypi/simple \
|
||||||
|
--timeout 120 \
|
||||||
|
--retries 5 \
|
||||||
|
-r requirements-dev.txt
|
||||||
- name: Check migrations
|
- name: Check migrations
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
run: ../.venv-ci/bin/python manage.py makemigrations --check --dry-run
|
run: ../.venv-ci/bin/python manage.py makemigrations --check --dry-run
|
||||||
@@ -57,4 +61,7 @@ jobs:
|
|||||||
.venv-ci/bin/python backend/manage.py migrate --noinput
|
.venv-ci/bin/python backend/manage.py migrate --noinput
|
||||||
.venv-ci/bin/python -m pytest -q
|
.venv-ci/bin/python -m pytest -q
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: docker build -t hulumath:${{ gitea.sha }} .
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple \
|
||||||
|
-t hulumath:${{ gitea.sha }} .
|
||||||
|
|||||||
@@ -43,7 +43,11 @@ jobs:
|
|||||||
- name: 安装测试依赖
|
- name: 安装测试依赖
|
||||||
run: |
|
run: |
|
||||||
python3 -m venv .venv-ci
|
python3 -m venv .venv-ci
|
||||||
.venv-ci/bin/python -m pip install -r requirements-dev.txt
|
.venv-ci/bin/python -m pip install \
|
||||||
|
--index-url https://mirrors.aliyun.com/pypi/simple \
|
||||||
|
--timeout 120 \
|
||||||
|
--retries 5 \
|
||||||
|
-r requirements-dev.txt
|
||||||
|
|
||||||
- name: 检查迁移文件
|
- name: 检查迁移文件
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
|
|||||||
+5
-1
@@ -1,8 +1,12 @@
|
|||||||
FROM python:3.11-slim AS runtime
|
FROM python:3.11-slim AS runtime
|
||||||
|
|
||||||
|
ARG PIP_INDEX_URL=https://pypi.org/simple
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
PYTHONUNBUFFERED=1 \
|
PYTHONUNBUFFERED=1 \
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||||
|
PIP_INDEX_URL=$PIP_INDEX_URL \
|
||||||
|
PIP_DEFAULT_TIMEOUT=120
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user