Compare commits

..

2 Commits

Author SHA1 Message Date
8acc5d8a75 Add .idea/modules.xml to define project modules
Some checks failed
CI / build (push) Failing after 6m22s
2025-07-18 19:18:38 +08:00
667ec6cc7b Add check for setup-node directory in CI workflow 2025-07-18 19:16:03 +08:00

View File

@ -8,38 +8,52 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest-2
steps: steps:
- name: Checkout code - name: 克隆本地 checkout action
uses: actions/checkout@v3 run: |
git clone http://114.67.155.184:3000/niyyzf/checkout.git ./.actions/checkout
- name: Set up Node.js - name: 克隆本地 setup-node action
uses: actions/setup-node@v3 run: |
git clone http://114.67.155.184:3000/niyyzf/setup-node.git ./.actions/setup-node
- name: 克隆本地 setup-python action
run: |
git clone http://114.67.155.184:3000/niyyzf/setup-python.git ./.actions/setup-python
- name: 检查 setup-node 目录
run: ls -l ./.actions/setup-node
- name: 检出代码
uses: ./.actions/checkout
- name: 设置 Node.js
uses: ./.actions/setup-node
with: with:
node-version: '18' node-version: '18'
- name: Install frontend dependencies - name: 安装前端依赖
working-directory: platform working-directory: platform
run: npm install run: npm install
- name: Build frontend - name: 构建前端
working-directory: platform working-directory: platform
run: npm run build run: npm run build
- name: Set up Python - name: 设置 Python
uses: actions/setup-python@v4 uses: ./.actions/setup-python
with: with:
python-version: '3.10' python-version: '3.10'
- name: Install backend dependencies - name: 安装后端依赖
working-directory: back working-directory: back
run: pip install -r requirements.txt run: pip install -r requirements.txt
- name: Run backend tests (if any) - name: 运行后端测试(如有)
working-directory: back working-directory: back
run: | run: |
if [ -f tests/test.py ]; then python -m unittest discover -s tests; fi if [ -f tests/test.py ]; then python -m unittest discover -s tests; fi
- name: Build Docker image - name: 构建 Docker 镜像
run: docker-compose build run: docker-compose build