Refine .gitignore to exclude additional files and improve project cleanliness
Some checks failed
CI / build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
This commit is contained in:
48
.gitea/workflows/ci.yml
Normal file
48
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest-1
|
||||
steps:
|
||||
- name: 克隆本地 checkout action
|
||||
run: |
|
||||
git clone http://114.67.155.184:3000/niyyzf/checkout.git ./.actions/checkout
|
||||
|
||||
- name: 检出代码
|
||||
uses: ./.actions/checkout
|
||||
|
||||
- name: 设置 Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: 安装前端依赖
|
||||
working-directory: platform
|
||||
run: npm install
|
||||
|
||||
- name: 构建前端
|
||||
working-directory: platform
|
||||
run: npm run build
|
||||
|
||||
- name: 设置 Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: 安装后端依赖
|
||||
working-directory: back
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: 运行后端测试(如有)
|
||||
working-directory: back
|
||||
run: |
|
||||
if [ -f tests/test.py ]; then python -m unittest discover -s tests; fi
|
||||
|
||||
- name: 构建 Docker 镜像
|
||||
run: docker-compose build
|
||||
Reference in New Issue
Block a user