CI/CD
This commit is contained in:
+4
-23
@@ -1,23 +1,11 @@
|
|||||||
name: AI Service CI/CD
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [production]
|
|
||||||
paths:
|
|
||||||
- '**'
|
|
||||||
- '.gitea/workflows/ai.yml'
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches: [production]
|
|
||||||
paths:
|
|
||||||
- '**'
|
|
||||||
- '.gitea/workflows/ai.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Lint & Test
|
name: Lint & Test
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: mirror2.chabokan.net/ubuntu:22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Ubuntu apt mirrors
|
- name: Setup Ubuntu apt mirrors
|
||||||
run: |
|
run: |
|
||||||
@@ -30,17 +18,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Python
|
- name: Install Python
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y python3 python3-pip python3-venv git
|
apt-get install -y python3 python3-pip git
|
||||||
|
|
||||||
- name: Setup Python pip mirrors
|
|
||||||
run: |
|
|
||||||
pip3 config --user set global.index-url https://package-mirror.liara.ir/repository/pypi/simple
|
|
||||||
pip3 config --user set global.extra-index-url https://mirror.cdn.ir/repository/pypi/simple
|
|
||||||
pip3 config --user set global.trusted-host "package-mirror.liara.ir mirror.cdn.ir mirror2.chabokan.net"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
pip3 install pytest flake8
|
pip3 install pytest flake8
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user