From edabc8036283e66b7ec13d4f563d199fc10bf5a0 Mon Sep 17 00:00:00 2001 From: Mohammad Sajad Pourajam Date: Fri, 20 Mar 2026 03:02:55 +0330 Subject: [PATCH 1/2] CI/CD --- .gitea/workflows/ai.yml | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/ai.yml b/.gitea/workflows/ai.yml index cd75e2f..e41e8ff 100644 --- a/.gitea/workflows/ai.yml +++ b/.gitea/workflows/ai.yml @@ -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: test: name: Lint & Test runs-on: self-hosted + container: + image: mirror2.chabokan.net/ubuntu:22.04 + steps: - name: Setup Ubuntu apt mirrors run: | @@ -30,17 +18,10 @@ jobs: - name: Install Python run: | - apt-get install -y python3 python3-pip python3-venv 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" + apt-get install -y python3 python3-pip git - name: Install dependencies run: | - python3 -m pip install --upgrade pip pip3 install -r requirements.txt pip3 install pytest flake8 From 1169eb89a058223cafe5880b6bccf672cfa42319 Mon Sep 17 00:00:00 2001 From: Mohammad Sajad Pourajam Date: Fri, 20 Mar 2026 03:03:58 +0330 Subject: [PATCH 2/2] CI/CD --- .gitea/workflows/ai.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ai.yml b/.gitea/workflows/ai.yml index e41e8ff..480ec89 100644 --- a/.gitea/workflows/ai.yml +++ b/.gitea/workflows/ai.yml @@ -1,9 +1,23 @@ +name: AI Service CI/CD + +on: + push: + branches: [production] + paths: + - '**' + - '.gitea/workflows/ai.yml' + + pull_request: + branches: [production] + paths: + - '**' + - '.gitea/workflows/ai.yml' + jobs: test: name: Lint & Test runs-on: self-hosted - - container: + container: image: mirror2.chabokan.net/ubuntu:22.04 steps: @@ -18,10 +32,17 @@ jobs: - name: Install Python run: | - apt-get install -y python3 python3-pip git + apt-get install -y python3 python3-pip python3-venv 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 run: | + python3 -m pip install --upgrade pip pip3 install -r requirements.txt pip3 install pytest flake8